In C++11, since there is a standard std::to_string(), I overload this function for enumeration classes and other small data classes where an implementation makes sense.
My question is, what do you implement as a complement to std::to_string()?
Some kind of from_string() (which doesn’t exist in std) or is there a more appropriate standard interface you implement throughout your classes?
the standard using uses the terse naming scheme used in old C. so where you have
you have
see here
http://en.cppreference.com/w/cpp/string/basic_string/stol
so where you might have.
you might have
although I would just be verbose about it
or just use streams
Defining stream operator also allows to use lexical cast from boost;