fullyQualifiedName fails on template
Dicebot
public at dicebot.lv
Sat Jan 25 03:52:29 PST 2014
On Saturday, 25 January 2014 at 08:53:19 UTC, Timon Gehr wrote:
> alias Seq(T...)=T;
>
> struct A(T...){}
> struct B{}
> struct C{}
>
> alias T=A!(B,C);
>
>
> static if(is(T==X!Y,alias X,Y...)){
> static assert(__traits(isSame, X, A));
> static assert(is(Y==Seq!(B,C)));
> }
It won't work for templated function type though and probably
some other cases I have forgotten by today. That was the problem
locking fullyQualifiedName update as such functionality in Phobos
is suppose to be generic.
That said, probably adding simple special case for aggregate
types is worth it as it seems most common thing to encounter.
More information about the Digitalmars-d
mailing list