std::locale::facet(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸ’– 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 id member 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