I was happy for the standard library to get a to_string
function, but now I'm in WTF mode. First of all why isn't this templated, second of all if it is not a template on return value then why in the world they don't have to_u16string()
and to_u32string()
functions.
I know that there is boost lexical cast, but I'm curious to know if there is a standard way to get what I want without manually writing these functions?
EDIT: to make matters worse boost 1.46 also dislikes u16string :(
boost::lexical_cast<u16string>(22.44);
terminate called after throwing an instance of 'boost::exception_detail::clone_impl
' what(): bad lexical cast: source type value could not be interpreted as target