std::locale::operator=(3)
πΈ NAME πΈ
Okay bestie, this is the page for std::locale::operator= from the C++ Standard Library manual, and the name is literally serving double:
std::locale::operator=βstd::locale::operator=
β¨ Synopsis β¨
Itβs giving βdefined in headerβ energy:
Defined in header <locale>
const locale& operator=( const locale& other ) throw(); (until C++11)
const locale& operator=( const locale& other ) noexcept; (since C++11)
So there are two vibe-check versions: the throw() one until C++11, and the noexcept one since C++11. Slay.
π Description π
So basically, this operator creates a copy of other and replaces the contents of *this with it. Iconic behavior, honestly.
The reference counts of all facets held by other are incremented. Then the reference counts of all facets previously held by *this are decremented, and those facets whose reference count becomes zero are deleted. Boom. Housekeeping. Periodt.
π Return value π
It returns *this, which is now a copy of other. Thatβs it. Thatβs the whole return-value moment. π«Ά
π¦ Example π¦
This section is incomplete.
Reason: no example.
The example section really said βno thoughts, head emptyβ π but thatβs literally what the page says, so weβre respecting it.
π See also π
- constructor β constructs a new locale (public member function)
π Category π
- * Todo no example
Sign-off time, bestie πβ¨ This page comes from cppreference.com, and itβs dated 2024.06.10. Keep slaying those locales ππ₯
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms