I am trying to define the same template class in several version, each with a different template parameter. The compiler is giving me the error
previous declaration ‘template<class T1> class A’ used Is there a way to circumvent this problem? Unfortunately I cannot use Cx++11 where I can assign a default template parameter. What is a good practice to tackle this issue? I am using old g++4.4.7
#include <iostream> template <class T1> class A{}; template <class T1,class T2> class A{}; int main() { return 0; }
template <typename T1, typename T2 = void> class A { };