UDAs on templates
Dicebot
public at dicebot.lv
Wed Oct 16 06:38:43 PDT 2013
On Wednesday, 16 October 2013 at 13:24:59 UTC, Max Samukha wrote:
> @(1)
> template Foo(T : int) {}
>
> @(2)
> template Foo(T : short) {}
>
> __traits(getAttributes, Foo) == ?
>
> The current semantics seems quite reasonable.
@(1)
void foo(int) {}
@(2)
void foo(double) {}
pragma(msg, __traits(getAttributes, foo));
void main() {}
// Compilation output:
//
// tuple(1)
More information about the Digitalmars-d-learn
mailing list