Class declaration is in a class.h file :
template <typename K, typename T>
class classx
{
...
unsigned int func1(K key);
...
which includes this class.hpp :
template <typename K, typename T>
unsigned int classx<K,T>::func1(K key)
{
return 1;
}
//Func1 for <int, typename T> ????
template <>
template <typename T>
unsigned int classx<int,T>::func1<int, T>(int key) // ERROR!
{
return 1;
}
This results:
error: expected initializer before ‘<’ token
What is the proper way of doing this?