Checking @nogc-ness of an Allocator.allocate()

Nordlöw per.nordlow at gmail.com
Thu Jan 11 12:24:36 UTC 2018


How do I check whether an aggregate member function (call for a 
specific argument) is @nogc or not?

I want to check whether

     Allocator.allocate(1)

(for a any Allocator) is @nogc or not?

Is

https://dlang.org/phobos/std_traits.html#hasFunctionAttributes

the way to do it?


More information about the Digitalmars-d-learn mailing list