D
dgront
Maybe my question is too simple, but I've spent some time on it and
still don't know..
I need a template function, converting from string to other data types:
template <typename T> converter(std::string s);
For T = double, int, etc. it works fine. But how to do it for a type
which already is a template, like
template<typename T> class Point { T x, y,z; };
template<typename T> class AnotherClass { T data; };
How to make converter working both for Point<T>, AnotherClacc<T>,
double, int, etc...?
Dominik
still don't know..
I need a template function, converting from string to other data types:
template <typename T> converter(std::string s);
For T = double, int, etc. it works fine. But how to do it for a type
which already is a template, like
template<typename T> class Point { T x, y,z; };
template<typename T> class AnotherClass { T data; };
How to make converter working both for Point<T>, AnotherClacc<T>,
double, int, etc...?
Dominik