__traits and std.traits and constructors

Jonathan M Davis jmdavisProg at gmx.com
Sun Nov 14 02:16:26 PST 2010


Is there a way to get use constructors with traits functions that take a 
function? For instance, functionAttributes!(func) takes a func and tells you 
whether it's pure, nothrow, etc. However, giving it the type doesn't work (i.e. 
functionAttributes!T), and giving it this doesn't work (i.e. functionAttributes!
(T.this)), and functionAttributes!(T()) doesn't work either (though that's 
probably trying to use opCall()). Is there a way to pass the constructor to 
traits functinos like functionAttributes!(). And if so, how?

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list