 |
C++Talk.NET C++ language newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Krzysztof Żelechowski Guest
|
Posted: Fri Mar 11, 2005 7:40 pm Post subject: Impact of the ios_base parameter upon the semantics of time_ |
|
|
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 ]
|
|
| Back to top |
|
 |
P.J. Plauger Guest
|
Posted: Sat Mar 12, 2005 4:16 pm Post subject: Re: Impact of the ios_base parameter upon the semantics of |
|
|
""Krzysztof Żelechowski"" <yecril (AT) bluebottle (DOT) com> wrote
| Quote: | 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 ]
|
|
| Back to top |
|
 |
Krzysztof Żelechowski Guest
|
Posted: Mon Apr 11, 2005 6:57 pm Post subject: Re: Impact of the ios_base parameter upon the semantics of t |
|
|
===================================== 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 (AT) dinkumware (DOT) com> napisał w wiadomości
news:20050312135257.42B3F1022A (AT) mscan3 (DOT) ucar.edu...
""Krzysztof Żelechowski"" <yecril (AT) bluebottle (DOT) com> wrote
| Quote: | 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 ]
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|