digitalmars.D.bugs - dmd v0.94 template instance alias
- Regan Heath <regan netwin.co.nz> Jul 03 2004
- "Walter" <newshound digitalmars.com> Jul 06 2004
--[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/
Jul 03 2004
"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.
Jul 06 2004








"Walter" <newshound digitalmars.com>