Not sure if this is a bug, or just some missing functionality of pure. void f() pure { enum a = to!string("a"); // some legal compile-time to!() } Gives "to is not pure" The following works: template S(alias v) { enum S = to!string(v); } void g() pure { enum a = S!"a"; } Should purity be checked at all if used with an enum? Tested on dmd 2.057 / linux x64