www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - dmd v0.94 template instance alias

reply Regan Heath <regan netwin.co.nz> writes:
--[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
parent "Walter" <newshound digitalmars.com> writes:
"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