On 24 Mar 2014 17:49, "VZ" <notifications@github.com> wrote:
> In include/private/soci-cstrtod.h:
> > +
> > +// Locale-independent, i.e. always using "C" locale, function for
converting
> > +// strings to numbers.
> > +//
> > +// The string must contain a floating point number in "C" locale, i.e.
using
> > +// point as decimal separator, and nothing but it. If it does, the
converted
> > +// number is returned, otherwise an exception is thrown.
> > +inline
> > +double cstring_to_double(std::string const & str)
> > +{
> > +    using namespace std;
> > +
> > +    double d;
> > +    istringstream is(str);
> > +    is.imbue(locale::classic());
> > +    is >> d;
>
> Speed improvement doesn't matter if it's incorrect. The whole point of
this change is to make this function locale-independent, i.e. parse numbers
correctly even if the current locale uses comma as decimal separator.
strtod() wouldn't work for this.

Vadim, you're absolutely right, of course. I mentioned strtod as a
side-note, not as alternative solution.