i need to do a typedef like this.
template< class A, class B, class C >
class X
{
};
template< class B, class C >
typedef X< std::vector<B>, B, C > Y;
I just found that it is not supported in C++. Can someone advise me on how to achieve the same through alternative means?
Thanks,
Gokul.
If you have a C++0x/C++1x compiler, that will be allowed with a slightly different syntax (it seems as if compilers don’t still support this feature):
You can use other techniques, like defining an enclosed type in a templated struct (like Pieter suggests), or abusing inheritance (avoid if possible):