C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Impact of the ios_base parameter upon the semantics of time_

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards
View previous topic :: View next topic  
Author Message
Krzysztof Żelechowski
Guest





PostPosted: Fri Mar 11, 2005 7:40 pm    Post subject: Impact of the ios_base parameter upon the semantics of time_ Reply with 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?
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





PostPosted: Sat Mar 12, 2005 4:16 pm    Post subject: Re: Impact of the ios_base parameter upon the semantics of Reply with quote



""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





PostPosted: Mon Apr 11, 2005 6:57 pm    Post subject: Re: Impact of the ios_base parameter upon the semantics of t Reply with quote




===================================== 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
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language, library and standards All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.