On Mon, Mar 01, 2021 at 08:05:57PM +0000, Jack via Digitalmars-d-learn wrote: > bool g(T)(T) > { > return __traits(compiles, mixin("{ enum a = t; }")); > } > > > int a; > enum s = ""; > // both return false but g(s) is expected to return true > pragma(msg, g(s)); > pragma(msg, g(a));
https://wiki.dlang.org/User:Quickfur/Compile-time_vs._compile-time T -- They pretend to pay us, and we pretend to work. -- Russian saying