UDAs on templates

John Colvin john.loughran.colvin at gmail.com
Wed Oct 16 05:26:32 PDT 2013


It seems that __traits(getAttributes, T) returns an empty tuple 
for any template (or template function) T, no matter what UDAs T 
has been given.

Am I doing something wrong?

@(1) void foo(T)(){}

pragma(msg, __traits(getAttributes, foo)); // tuple()
pragma(msg, __traits(getAttributes, foo!int)); // tuple(1)


More information about the Digitalmars-d-learn mailing list