July 04, 2004 dmd v0.94 template instance alias | ||||
---|---|---|---|---|
| ||||
--[alias.d]--
template aT(T)
{
T value;
}
alias aT!(int) foo;
struct B {
mixin foo;
}
void main() {
}
D:\D\src\build\temp>dmd alias.d
alias.d(9): mixin foo!() foo is not a template
typedef does not work either, should either work?
Regan.
--
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
|
July 06, 2004 Re: dmd v0.94 template instance alias | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | "Regan Heath" <regan@netwin.co.nz> wrote in message news:opsak7pt065a2sq9@digitalmars.com... > --[alias.d]-- > template aT(T) > { > T value; > } > > alias aT!(int) foo; > > struct B { > mixin foo; > } > > void main() { > } > > D:\D\src\build\temp>dmd alias.d > alias.d(9): mixin foo!() foo is not a template > > > typedef does not work either, should either work? No. foo is not a template, it is an instance of a template. Mixins only work with templates. |
Copyright © 1999-2021 by the D Language Foundation