class myclass
{
...
private:
template < typename T > std::string myfunc()
{
// here only exception, specialization forward
assert(false);
}
...
}; //myclass
// explicit specialization
template <> std::string myclass::myfunc < double >()
{
// here do some stuff
}
This compiles, but the linker displays an error message: "multiple defition, bla-bla". I thought that I could move the specialization to the class scope, but then it doesn't compile, because the specialization should be in a namespace scope.