Namespaces
Variants
Views
Actions

Difference between revisions of "cpp/locale/locale/classic"

From cppreference.com
< cpp‎ | locale‎ | locale
m (fmt)
(- {{dcl header|locale}})
 
Line 2: Line 2:
 
{{cpp/locale/locale/navbar}}
 
{{cpp/locale/locale/navbar}}
  
{{ddcl|header=locale|
+
{{ddcl|
 
static const locale& classic();
 
static const locale& classic();
 
}}
 
}}

Latest revision as of 22:55, 18 October 2024

 
 
 
 
static const locale& classic();

Obtains a reference to the C++ locale that implements the classic "C" locale semantics. This locale, unlike the global locale, cannot be altered.

Contents

[edit] Parameters

none

[edit] Return value

Returns a reference to the "C" locale.

[edit] Notes

Some of the standard-required facets, such as the UTF-8/UTF-32 conversion facet std::codecvt<char32_t, char, std::mbstate_t>, have no equivalents in the "C" locale, but they are nevertheless present in the locale returned by std::locale::classic(), as in any other locale constructed in a C++ program.

[edit] Example

[edit] See also

[static]
changes the global locale
(public static member function) [edit]