J
John Harrison
Torsten Curdt said:template<class TYPE, class ELEMENT>
class MyClass : public TYPE<ELEMENT,ELEMENT>
{
};
This does not seem to work - but why?
Because it makes my head hurt?
john
Torsten Curdt said:template<class TYPE, class ELEMENT>
class MyClass : public TYPE<ELEMENT,ELEMENT>
{
};
This does not seem to work - but why?
Torsten Curdt said:template<class TYPE, class ELEMENT>
class MyClass : public TYPE<ELEMENT,ELEMENT>
{
};
This does not seem to work - but why?
God what a headache! Generalizing the generalized! =/Jakob Bieling said:template <template <class T, class U> class TYPE, class ELEMENT>
class MyClass : public TYPE <ELEMENT,ELEMENT>
Torsten Curdt said:ok, but then I would need to use the template like this, right?
MyClass< Base<A,B> >
but because usually A == B I'd like to write
MyClass< Base, A >
but now I understand: "Base" is not a regular but a class
template - that's why, right?
Any way to work around this?
A>" (and I assume 'Base' is a template class and 'A' is a typename), which
is exactly how you are supposed to write it.
gcc doesTorsten said:ok, thanks
too bad but the compiler doesn't like nested templates
Torsten Curdt said:ok, thanks
too bad but the compiler doesn't like nested templates
Jakob said:Which one are you using? VC++ 7.1 supports them.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.