Interactive D?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Tue Feb 26 11:57:27 PST 2008
"Oskar Linde" <oskar.lindeREM at OVEgmail.com> wrote in message
news:fq18lf$120r$1 at digitalmars.com...
>>>
>>> 1A: test.A!(int).A WRONG
>>
>> This one is correct, as far as I can see. A!(int) a; is just sugar for
>> A!(int).A a;.
>
> Nope, if implicit template properties is in action, A!(int) is the only
> valid way to refer to the template instance. If that weren't the case,
> consider:
>
> template A(T) { struct A { int A; }}
>
> what is A!(int).A ?
Ah, I see. You're right that A!(int).A does not compile.
However I can still understand that the compiler would stringize it as
"A!(int).A", since that's how it's defined and how it's represented. I
suppose that the question of whether .stringof should give compilable code
or not is under debate.
More information about the Digitalmars-d
mailing list