std::locale::global

Defined in header <locale> static locale global( const locale& loc ); Replaces the global C++ locale with loc, which means all future calls to the std::locale default constructor will now return a copy of loc. If loc has a name, also replaces the C locale as if by std::setlocale(LC_ALL, loc.name().c_str());. This function is the only way to modify the global C++ locale, which is otherwise equivalent to std::locale::classic() at program startup. Parameters loc -

std::locale::facet::facet

Defined in header <locale> explicit facet( std::size_t refs = 0 ); (1) facet(const facet&) = delete; (2) 1) creates a facet with starting reference count refs. If refs is non-zero, the facet will not be deleted when the last locale referencing it goes out of scope. A facet with static or dynamic storage duration should always be constructed with a non-zero refs. 2) copy constructor is deleted; std::locale::facet is not copyable.

std::locale::facet

Defined in header <locale> class locale::facet; std::locale::facet is the base class for facets. It provides a common base class so that locales could store pointers to the facets they implement in a single indexed container, and it abstracts support for facet reference counting. Whenever a facet is added to a locale, the locale increments the reference count in the facet (through an implementation-specific mechanism). Whenever a locale is destructed or modified, it decreme

std::locale::combine

Defined in header <locale> template< class Facet > locale combine( const locale& other ) const; Constructs a locale object which is a copy of *this except for the facet of type Facet, which is copied from other. Return value The new, nameless, locale. Exceptions std::runtime_error if other does not implement Facet. Example #include <iostream> #include <locale> int main() { const double number = 1000.25; std::cout << "\"C\" lo

std::locale::classic

Defined in header <locale> 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. Parameters none. Return value Returns a reference to the "C" locale. 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 n

std::locale

Defined in header <locale> class locale; An object of class std::locale is an immutable indexed set of immutable facets. Each stream object of the C++ input/output library is associated with an std::locale object and uses its facets for parsing and formatting of all data. In addition, a locale object is associated with each std::basic_regex object. Locale objects can also be used as predicates that perform string collation with the standard containers and algorithms and can

std::literals::string_literals::operator&quot;&quot;s

Defined in header <string> string operator "" s(const char *str, std::size_t len); (1) (since C++14) u16string operator "" s(const char16_t *str, std::size_t len); (2) (since C++14) u32string operator "" s(const char32_t *str, std::size_t len); (3) (since C++14) wstring operator "" s(const wchar_t *str, std::size_t len); (4) (since C++14) Forms a string literal of the desired type. 1) returns std::string{str, len} 2) returns std::u16string{str, len} 3

std::literals::complex_literals::operators

Defined in header <complex> constexpr complex<double> operator""i(long double arg); constexpr complex<double> operator""i(unsigned long long arg); (1) (since C++14) constexpr complex<float> operator""if(long double arg); constexpr complex<float> operator""if(unsigned long long arg); (2) (since C++14) constexpr complex<long double> operator""il(long double arg); constexpr complex<long double> operator""il(unsigned long long arg); (3

std::literals::chrono_literals::operator&quot;&quot;us

Defined in header <chrono> constexpr std::chrono::microseconds operator "" us(unsigned long long us); (1) (since C++14) constexpr std::chrono::duration</*unspecified*/, std::micro> operator "" us(long double us); (2) (since C++14) Forms a std::chrono::duration literal representing microseconds. 1) integer literal, returns exactly std::chrono::microseconds(us) 2) floating-point literal, returns a floating-point duration equivalent to

std::literals::chrono_literals::operator&quot;&quot;s

Defined in header <chrono> constexpr chrono::seconds operator "" s(unsigned long long secs); (1) (since C++14) constexpr chrono::duration</*unspecified*/> operator "" s(long double secs); (2) (since C++14) Forms a std::chrono::duration literal representing seconds. 1) integer literal, returns exactly std::chrono::seconds(secs) 2) floating-point literal, returns a floating-point duration equivalent to std::chrono::seconds Parameters secs - the number