I am very new on C++ templated code. could you please educate me on the following questions: If I want to use function template (that only has non-type parameters) to define member function for a class, do I also need to define template for that class too. or in other word, does C++ allow user to define member function template (that has only non-type parameters) within untemplated class. for instance:
class foo{
template <int vecsize>
void bar(std::vector<int, vecsize> vec);
}
thank you.
Aucun commentaire:
Enregistrer un commentaire