How can I do that in @nogc?

Ivan Timokhin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Feb 25 11:52:25 PST 2015


On Wed, Feb 25, 2015 at 07:32:48PM +0000, Namespace wrote:
> ----
> void glCheck(lazy void func, string file = __FILE__, uint line = 
> __LINE__) {
> 	func();
> 	glCheckError(file, line);
> }
> ----
> 
> How can I specify that 'func' is @nogc? Or can define the 
> function otherwise?

Try

void glCheck(scope void delegate() @nogc func,...)


More information about the Digitalmars-d-learn mailing list