79758147

Date: 2025-09-07 13:50:36
Score: 0.5
Natty:
Report link

If you want to define the specialization in a .cpp file, you may have to instantiate the class to tell the compiler to compile the function. If the function isn't compiled, you'll get a linker error.

template class TClass<int>;

template <>
void TClass<int>::doSomething(std::vector<int> * v)
{
    ...
}
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: calvinsomething