std::locale does not work here
Patrick Gräbel
pgraebel@stud.fh-dortmund.de
Tue Jun 22 00:41:00 GMT 2004
I am using Cygwin (g++-3.3.1) and Debian/stable (g++-3.0.1). The
following call will not throw an "runtime_error" that is described in
Stroustrup's C++ bible:
std::locale loc("$$§§§XXXYYY????!!!");
The constructor even accepts locale strings, that do not make sense.
Also the following code will _not_ produce a ',' instead of a '.':
std::locale loc("de_DE");
double d = 1.76;
std::cout.imbue(loc);
std::cout << d << std::endl;
That's weird. Is g++'s stdc++ lib incompatible to the standard?
Please help me!
-Patrick
More information about the Libstdc++
mailing list