Topic: Impact of the ios_base parameter upon the semantics of


Author: pjp@dinkumware.com ("P.J. Plauger")
Date: Sat, 12 Mar 2005 16:16:12 GMT
Raw View
""Krzysztof =AFelechowski"" <yecril@bluebottle.com> wrote in message=20
news:d0sjat$61n$1@sklad.atcom.net.pl...

> The date string is localized according to the ios_base parameter under=20
> g++, whereas Microsoft Visual C++ uses the locale the facet was extract=
ed=20
> from. The result is different.  Which approach is correct?

Not clear what you're saying. Every ostream object stores a
locale object in its basic_ios base class. (Whether the
locale object is actually stored in basic_ios base or even
deeper in the ios_base subobject is a gray area.) The facet
time_put should be obtained as needed from this locale
object. VC++ certainly does this, but I don't understand
what difference in behavior you're identifying for g++.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com


---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]