I have the below draft of code:
template <class A, class B = B2>
class SM
{
A a;
f();
// .....
};
template <class A, class B>
SM<A,B>::f()
{
cout<< a <<" Using B"<<endl;
};
How can I overload the behaviour of this function?
I want to get this behaviour:
template <class A>
SM<A,B2>::f()
{
cout<< a <<" Using B2"<<endl;
};