www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - __traits and std.traits and constructors

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
Nov 14 2010