Boost logo

Boost :

Subject: Re: [boost] [locale] Strange(?) result in example code
From: Artyom (artyomtnk_at_[hidden])
Date: 2011-04-18 17:14:49


>
> What about library provided functions, such as the following?
>
> void
> imbue_globally(_locale)
> {
> std::locale::global(_locale);
> std::cout.imbue(_locale);
> std::cin.imbue(_locale);
> std::cerr.imbue(_locale);
> std::clog.imbue(_locale);
> }
>
> void
> wimbue_globally(_locale)
> {
> std::locale::global(_locale);
> std::wcout.imbue(_locale);
> std::wcin.imbue(_locale);
> std::wcerr.imbue(_locale);
> std::wclog.imbue(_locale);
> }
>

It should be rather

> void
> imbue_globally(_locale)
> {
> std::locale::global(_locale);
>
> std::cout.imbue(_locale);
> std::cin.imbue(_locale);
> std::cerr.imbue(_locale);
> std::clog.imbue(_locale);
>
> std::wcout.imbue(_locale);
> std::wcin.imbue(_locale);
> std::wcerr.imbue(_locale);
> std::wclog.imbue(_locale);
>
> boost::filesystem::path::imbue(_locale);
>
> }
>

Of course when you use boost.filesyste,

Artyom


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk