[locale.statics] (original) (raw)
28 Localization library [localization]
28.3 Locales [locales]
28.3.1 Class locale [locale]
28.3.1.5 Static members [locale.statics]
static locale global(const locale& loc);
Effects:Sets the global locale to its argument.
Causes future calls to the constructorlocale()to return a copy of the argument.
If the argument has a name, does
setlocale(LC_ALL, loc.name().c_str());
otherwise, the effect on the C locale, if any, is implementation-defined.
Remarks:No library function other thanlocale::global()affects the value returned bylocale().
[ Note
:
See [c.locales] for data race considerations whensetlocale is invoked.
— end note
]
Returns:The previous value oflocale().
static const locale& classic();
Returns:A locale that implements the classic "C" locale semantics, equivalent to the value locale("C").
Remarks:This locale, its facets, and their member functions, do not change with time.