How to overload/specialize template class function to handle arithmetic types and a container-class
问题 I am trying to create a template class with a memberfunction which can handle arithmetic datatypes (int, char, float ...) and a container-class like Eigen::DenseBase<> or std::vector<> Code to demonstrate my idea: template <typename T>class myClass{ ... void foo(T); ... }; template <typename T> void myClass<T>::foo(T){ //Function for arithmetic Datatypes } //Specialization does not work - What is the correct (best?) approach? template <> void myClass<T>::foo(<Eigen::DenseBase<T>){ //Function