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 for Eigen::DenseBase<T> - Objects
}
This are my first steps with template-programming so I am looking forward to tipps and ideas how to solve this problem