I have a template class that looks something like this:
template<class T> class C
{
void A();
void B();
};
template<class T> void C<T>::A() { }
template<class T> void C<T>::B() { }
I want to provide explicit specialization only for A, keeping the default value for Band "other stuff".
I tried so far
class D { };
template<> void C<D>::A() { }
Every other option I tried to execute with parse errors.
What I've done:
The original problem was that the explicit specialization was in the header file, so it was dumped into several object files and ruined the link (why does the linker not notice that all instances of the symbol are the same, just close up?)
, . , . , GCC , .