Boost logo

Boost :

Subject: Re: [boost] [locale] Review
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-18 08:30:02


>
> We shouldn't adapt for broken 3d-party libraries.
>
> If you so like the current Boost.Locale's behavior, provide a special
> *care_with_broken_c_libs_generator*, that's not default.
>
> > So if you need localized numbers you should use as::number otherwise
> > C/POSIX locale is used by default.
>
> inconsistent requirement
>
> >
> > It is by design.
>
> it's wrong
>

If so please implement following in C correctly:

void delete_values_above_x(double x)
{
   char statement[256];
   snprintf(statement,sizeof(statement),"DELETE FROM sometable WHERE x > %f",x);
   mysql_query(connection,statement)
}

When in current locale the decimal point is "," and x=3.14...

You can't do it in reasonable simple way in C.
It is design issue of standard C and C++ library.

Artyom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk