July 31, 2004 template parameters | ||||
---|---|---|---|---|
| ||||
I suspect this bug is on the to-do scroll, but I'll mention it
module test;
void main ()
{
}
class A(T)
{
}
class B (T, S: A!(T))
{
}
>dmd test.d
"test.d(7): identifier 'T' is not defined"
The compiler is okay with "S: T", "S = T" and "S: T = T".
XP DMD 0.97
|
July 31, 2004 Re: template parameters | ||||
---|---|---|---|---|
| ||||
Posted in reply to Bent Rasmussen | Bent Rasmussen wrote:
> I suspect this bug is on the to-do scroll, but I'll mention it
>
> module test;
>
> void main ()
> {
> }
>
> class A(T)
> {
> }
>
> class B (T, S: A!(T))
> {
> }
>
>
>>dmd test.d
>
> "test.d(7): identifier 'T' is not defined"
This raises the interesting issue of template template parameters, but in the above example you don't actually need the second template parameter at all.
Sean
|
Copyright © 1999-2021 by the D Language Foundation