potential locale issues with readScalar
We currently have two forms of readScalar. One that uses Istream/token and the second that uses strtof
or strtod
internally. Both strtof
and strtod
are apparently locale-dependent (cf, http://www.cplusplus.com/reference/cstdlib/strtod/).
Although it doesn't help with locale, but could also consider using the newer std::stof
or std::stod
instead, since these work with std::string directly. In any case, it would be nice to reduce the number of places with this type of code:
readScalar(IStringStream(str)());
We could quite reasonable either bury the IStringStream inside, or equivalent, so that we could simply use
readScalar(str);