www.digitalmars.com         C & C++   DMDScript  

D - Error? Typedef in template.

template TFoo(T)
{
	class Foo
	{
		typedef T FooType;
	}
}

template TBar(T)
{
	class Bar
	{
		T.FooType a;
	}
}

alias instance TFoo(int).Foo IntFoo;

// This generates no property 'FooType' for type 'Foo'
alias instance TBar(IntFoo) IntFooBar;

int main(char[][] argv)
{
	// This is ok
	IntFoo.FooType a;

	return 0;
}
Jul 07 2003