- status: open --> closed-fixed
At the moment the code has a lot of calls to strtoul to convert integers to strings, which has issues:
- we haven't been consistent in the radix (0 vs 10)
- we generally don't check for errors
- it will accept negative values and just convert them to unsigned
- it has different behaviour depending on the width of unsigned long
- it means we can't even support multiple locales, because in most cases we want the conversion to be in the C locale not the default locale
Additionally we have a lot of boilerplate code to do conversions in the other direction via ostringstream.
These problems could mostly be solved using something like boost::lexical_cast, or the C++11 functions to_string and stoi (but turning on C++11 means we'd need to convert all the auto_ptrs to unique_ptrs).