Thread overview
DMD 0.128: Alias arguments to a template cannot have default template values
Jul 21, 2005
Burton Radons
Jul 23, 2005
Andrew Fedoniouk
Jul 23, 2005
Burton Radons
July 21, 2005
This is allowed by the compiler:

   template A () { }

   class B (alias arg) { }

   class C : B! (A! ()) { }

But this is rejected with the error string "Error: A!() is not a symbol":

   template A () { }

   class B (alias arg = A! ()) { }

   class C : B! () { }
July 23, 2005
"Burton Radons" <burton-radons@smocky.com> wrote in message news:dbn2eh$1bbi$1@digitaldaemon.com...
> This is allowed by the compiler:
>
>    template A () { }
>
>    class B (alias arg) { }
>
>    class C : B! (A! ()) { }
>
> But this is rejected with the error string "Error: A!() is not a symbol":
>
>    template A () { }
>
>    class B (alias arg = A! ()) { }
>
>    class C : B! () { }

I cannot see any wrong behavior here.
alias arg = something

'something' here should be some variable name but not a type name as in your example.


July 23, 2005
Andrew Fedoniouk wrote:
> "Burton Radons" <burton-radons@smocky.com> wrote in message news:dbn2eh$1bbi$1@digitaldaemon.com...
> 
>>This is allowed by the compiler:
>>
>>   template A () { }
>>
>>   class B (alias arg) { }
>>
>>   class C : B! (A! ()) { }
>>
>>But this is rejected with the error string "Error: A!() is not a symbol":
>>
>>   template A () { }
>>
>>   class B (alias arg = A! ()) { }
>>
>>   class C : B! () { }
> 
> 
> I cannot see any wrong behavior here.
> alias arg = something
> 
> 'something' here should be some variable name but not a type name as in your
> example. 

It's an alias argument, it can take any scope - just as the first, working example shows.