-nogc switch doesn't allow compile time GC allocations: template foo(uint N) { import std.conv : to; static if(N == 0) enum foo = ""; else enum foo = N.to!string ~ foo!(N - 1); } pragma(msg, foo!10); Error: No implicit garbage collector calls allowed with -nogc option enabled: `_d_arrayappendcTX` Is it a bug?