std::locale::facet(3)
π NAME π
okay so bestie, the page title is std::locale::facet(3) and the thing itself is std::locale::facet β yes, same name, iconic. This is from the C++ Standard Libary manual. Periodt. β¨
πΈ Synopsis πΈ
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 decrements the reference count in each facet it no longer implements. Whenever a facet's reference count becomes zero, the locale performs:
delete static_cast<std::locale::facet*>(f);
where f is the pointer to the facet. π
π Member functions π
- constructor β constructs a new facet with specified reference count (protected member function)
operator=β the copy assignment operator is deleted (protected member function)- destructor β the destructor is protected virtual
[virtual]β (virtual protected member function)
π¦ Example π¦
This section is incomplete. Reason: no example.
No cap, that's literally what it says bestie π
π₯ Defect reports π₯
The following behavior-changing defect reports were applied retroactively to previously published C++ standards.
- DR: LWG 2694 β Applied to: C++98. Behavior as published: the definition of '
facet' was removed by the resolution of LWG issue 436. Correct behavior: added back the definition.
π See also π
- the facet index type: each facet class must declare or inherit a public static
idmember of this type β (class)
π Category π
- Todo β no example
okay that's the whole page bestie π«Ά source/version: http://cppreference.com Β· date: 2024.06.10 Β· page: std::locale::facet(3). mwah π
π¦ 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