My problem is the following
template<class T> MyClass
{
MyClass(/* Lots of parameters with no problem */, const T& min = 0, const T& max = std::numeric_limits<T>::max());
set(/* Lots of parameters with no problem */, const T& min = 0, const T& max = std::numeric_limits<T>::max());
/* Lots of function with no problem */
}
I want my template class to be compatible with std::string without reimplementing all the functions. For std::string I want min = "" and max = "". Currently, it crashes as 0 for example cannot be converted to a string. How to do that ? (if I can specialize only the constructor and the main setter it would be great).
Create the wrapper I guess? :