
26 Mar
2010
26 Mar
'10
1:25 a.m.
Rene Rivera <grafikrobot <at> gmail.com> writes:
Tom Brinkman wrote:
boost::lexical_cast_no_throw()
Or..
template <typename T, typename S> T lexical_cast(const S & arg, const T & error_default_value);
I've implemented later in my own version of lexical cast. In 99% of the time this is exactly what I need: either convert string to number or take this default value. Another good consequence is that I do not need template parameter anymore. Gennadiy