-nogc command line switch

Jack Applegame japplegame at gmail.com
Mon Nov 5 18:47:42 UTC 2018


-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?


More information about the digitalmars-d-ldc mailing list