On Tuesday, 20 May 2014 at 12:25:11 UTC, Dominikus Dittes Scherkl wrote:
Did I understand correct that a function can only be @nogc if also all functions that it calls are @nogc too (and of course it doesn't use the GC itself)?

If so, should this be possible:

string foo()
{
   // use GC to allocate some string
}

bar @nogc
{
   mixin(foo());
}

Because, bar() didn't really call foo() but instead foo() is evaluated during compile time and it's result is now part of the code, right?

Yes, that should be allowed.

Reply via email to