Am Tue, 30 Aug 2016 08:35:20 +0000
schrieb Stefan Koch <uplink.co...@googlemail.com>:

> I do not see how this could affect @nogc.

@nogc is only meaningful at runtime. So this could work:

module foo;
@nogc:
[...]

string ctfeOnly(string name)
{
    static assert(!__ctfe);
    // error: cannot use operator ~ in @nogc function
    return "int " ~ name ~ ";";
}
mixin(ctfeOnly("foo"));

Reply via email to