Am Tue, 30 Aug 2016 12:42:35 +0200 schrieb Johannes Pfau <nospam at example.com>: > @nogc is only meaningful at runtime. So this could work: > > module foo; > @nogc: > [...] > > string ctfeOnly(string name) > { > static assert(!__ctfe); This should be static assert(__ctfe); of course.