On 06/20/2017 09:47 AM, jmh530 wrote:
On Tuesday, 20 June 2017 at 15:24:06 UTC, Dukc wrote:
I wasn't skilled enough to make a generic version of this trough. And
I do not know what happens if @nogc function ends up calling gc.
This seems like it only would work if you know that there wouldn't be
any allocations. I don't really know though.
Below is a little more generic:
template gc78f(alias f)
void gc78f(T...)(T what) @nogc
alias fType = void function(T) @nogc;
void main() @nogc
string x = "hello world!";
And there is also assumeNoGC() which has been discussed before. (The
scary thing is, although it happened just five months ago I don't
remember taking part in it. :( )