Topic: Impact of the ios_base parameter upon the semantics of time_put::put
Author: "Krzysztof elechowski" <krixel@WP.PL>
Date: Mon, 11 Apr 2005 12:57:20 CST Raw View
===================================== MODERATOR'S COMMENT:
Please be more careful in quoting articles.
===================================== END OF MODERATOR'S COMMENT
Sorry for not having answered till today, my news server failed show your
question in time. As you probably know, the method time_put::put has an
ios_base object reference as its 2nd argument. Under VC++, the date is
formatted according to the locale the facet was obtained from; under g++,
the it is formatted according to the locale of the 2nd argument. The
results may be different.
Christopher Yeleighton
QED Sofware Co. Ltd.
U ytkownik ""P.J. Plauger"" <pjp@dinkumware.com> napisa w wiadomo ci
news:20050312135257.42B3F1022A@mscan3.ucar.edu...
""Krzysztof elechowski"" <yecril@bluebottle.com> wrote in message
news:d0sjat$61n$1@sklad.atcom.net.pl...
> The date string is localized according to the ios_base parameter under
> g++, whereas Microsoft Visual C++ uses the locale the facet was extracted
> 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 ]
---
[ 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 ]
Author: yecril@bluebottle.com ("Krzysztof elechowski")
Date: Fri, 11 Mar 2005 19:40:57 GMT Raw View
The date string is localized according to the ios_base parameter under g++,
whereas Microsoft Visual C++ uses the locale the facet was extracted from.
The result is different. Which approach is correct?
Chris
---
[ 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 ]