This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

locale::global and wcout


GCC version: 4.1.1 20070105 (Red Hat 4.1.1-51)

I just discovered that wcout is affected when setting the global
locale using locale::global(...) - although only when the locale is
set before the first reference to wcout. In particular with respect to
the 'CTYPE' facet.

This appears to be in violation of a statement made by BS in "The C++
programming language, third edition" page 650 (mid):

"Setting the global locale does not change the behavior of existing
streams that are using the previous value of the global locale. In
particular, cin, cout, etc., are not affected. If they should be
chnaged, they must be explicitly imbued ( ) d."

So, is this an intended deviation from the standard, or am I missing something?

Strangely, I was unable to find any mention of this in the standard
(the version available via the below link.)

http://www.cantrip.org/lib-locales.html


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]