On Tuesday, 5 March 2013 at 08:04:12 UTC, Andrej Mitrovic wrote: > You can't test declarations inside of __traits(compiles), only > expressions. It's in the docs: > http://dlang.org/traits.html#compiles So why does this work: import std.conv; void main() { enum s = "`1`.to!int;"; enum c = __traits(compiles, mixin("{auto x = "~s~";}")); // true }