I
Ian
Can it be done? If so, what's the syntax.
For example a full specialisation,
template <typename T>
struct X
{
template <typename C> void foo( C a ) {}
};
template<> template<>
void X<int>::foo<char>( char a ) { assert(0); }
int main()
{
X<int> x;
char c = 0;
x.foo( c );
}
Works fine, but
template<typename T> template<>
void X<T>::foo<char>( char a ) { assert(0); }
isn't legal.
Cheers,
Ian
For example a full specialisation,
template <typename T>
struct X
{
template <typename C> void foo( C a ) {}
};
template<> template<>
void X<int>::foo<char>( char a ) { assert(0); }
int main()
{
X<int> x;
char c = 0;
x.foo( c );
}
Works fine, but
template<typename T> template<>
void X<T>::foo<char>( char a ) { assert(0); }
isn't legal.
Cheers,
Ian