digitalmars.D.learn - __traits and std.traits and constructors
- Jonathan M Davis (8/8) Nov 14 2010 Is there a way to get use constructors with traits functions that take a...
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