Trying to use Mir ion, its a perfect example of the failure of D's attribute system
Walter Bright
newshound2 at digitalmars.com
Fri Jan 20 03:49:43 UTC 2023
Consider:
void delegate() dg;
// no error
void process(void delegate() userData) @nogc { dg = userData; }
// Error: `@nogc` function `process2` cannot call non- at nogc delegate `userData`
void process2(void delegate() userData) @nogc { userData(); }
If process() is made into a template, it will "inherit" @nogc based on whether
the delegate is called or not.
More information about the Digitalmars-d
mailing list