Is there anyway to make opApply @nogc?

Marc Schütz via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Jun 22 06:36:54 PDT 2016


On Tuesday, 21 June 2016 at 19:21:01 UTC, Gary Willoughby wrote:
> Right ok, thanks! It doesn't seem to help though as the 
> compiler complains about it being not @nogc.

You probably need to declare the delegate and opApply() itself as 
@nogc, too:

int opApply(scope int delegate(int) @nogc dg) @nogc { }


More information about the Digitalmars-d-learn mailing list