---
name: "std::locale_facet"
section: "3"
platform: "linux"
package: "gcc"
version: "16.2.1+r23+gd564253eb6c8-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/std::locale_facet"
---

# std::locale\_facet(3)

Localization functionality base class.

## NAME

std::locale::facet - Localization functionality base class.

## SYNOPSIS

\#include \<locale\>

Inherited by **std::\_\_codecvt\_abstract\_base\< \_InternT, \_ExternT, encoding\_state \>**, **std::\_\_codecvt\_abstract\_base\< char, char, mbstate\_t \>**, **std::\_\_codecvt\_abstract\_base\< char16\_t, char, mbstate\_t \>**, **std::\_\_codecvt\_abstract\_base\< char32\_t, char, mbstate\_t \>**, **std::\_\_codecvt\_abstract\_base\< wchar\_t, char, mbstate\_t \>**, **std::\_\_codecvt\_abstract\_base\< \_Elem, char, mbstate\_t \>**, **std::mask\< \_CharT \>**, **std::\_\_ctype\_abstract\_base\< wchar\_t \>**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>**, **std::num\_put\< \_CharT, ostreambuf\_iterator\< \_CharT, \_Traits \> \>**, **std::\_\_codecvt\_abstract\_base\< \_InternT, \_ExternT, \_StateT \>**, **std::\_\_ctype\_abstract\_base\< \_CharT \>**, **std::\_\_cxx11::collate\< \_CharT \>**, , , , , **std::ctype\< char \>**, **std::messages\< \_CharT \>**, **std::money\_get\< \_CharT, \_InIter \>**, **std::money\_put\< \_CharT, \_OutIter \>**, **std::moneypunct\< \_CharT, \_Intl \>**, and **std::num\_get\< \_CharT, \_InIter \>**.

### Protected Member Functions

**facet** (const facet &)=delete\
 **facet** (size\_t \_\_refs=0)  throw ()\
 Facet constructor.  virtual **~facet** ()\
 Facet destructor.  **facet** & **operator=** (const **facet** &)=delete\

### Static Protected Member Functions

static \_\_c\_locale **\_S\_clone\_c\_locale** (\_\_c\_locale &\_\_cloc)  throw ()\
 static void **\_S\_create\_c\_locale** (\_\_c\_locale &\_\_cloc, const char \*\_\_s, \_\_c\_locale \_\_old=0)\
 static void **\_S\_destroy\_c\_locale** (\_\_c\_locale &\_\_cloc)\
 static \_\_c\_locale **\_S\_get\_c\_locale** ()\
 static const char \* **\_S\_get\_c\_name** ()  throw ()\
 static \_\_c\_locale **\_S\_lc\_ctype\_c\_locale** (\_\_c\_locale \_\_cloc, const char \*\_\_s)\

### Friends

class **locale**\
 class **locale::\_Impl**\

## Detailed Description

Localization functionality base class.

The facet class is the base class for a localization feature, such as money, time, and number printing. It provides common support for facets and reference management.

Facets may not be copied or assigned.

## Constructor & Destructor Documentation

### std::locale::facet::facet (size\_t \_\_refs = 0) \[inline\], \[explicit\], \[protected\]

Facet constructor. This is the constructor provided by the standard. If refs is 0, the facet is destroyed when the last referencing locale is destroyed. Otherwise the facet will never be destroyed.

**Parameters**

*\_\_refs* The initial value for reference count.

Referenced by **std::\_\_cxx11::collate\< \_CharT \>::collate()**, **std::\_\_cxx11::collate\< \_CharT \>::collate()**, **std::messages\< \_CharT \>::messages()**, **std::messages\< \_CharT \>::messages()**, **std::money\_get\< \_CharT, \_InIter \>::money\_get()**, **std::money\_put\< \_CharT, \_OutIter \>::money\_put()**, **std::moneypunct\< \_CharT, \_Intl \>::moneypunct()**, **std::moneypunct\< \_CharT, \_Intl \>::moneypunct()**, **std::moneypunct\< \_CharT, \_Intl \>::moneypunct()**, **std::num\_get\< \_CharT, istreambuf\_iterator\< \_CharT, \_Traits \> \>::num\_get()**, **std::num\_put\< \_CharT, ostreambuf\_iterator\< \_CharT, \_Traits \> \>::num\_put()**, **std::numpunct\< \_CharT \>::numpunct()**, **std::numpunct\< \_CharT \>::numpunct()**, **std::numpunct\< \_CharT \>::numpunct()**, **std::time\_get\< \_CharT, \_InIter \>::time\_get()**, **std::time\_put\< \_CharT, \_OutIter \>::time\_put()**, and **~facet()**.

### virtual std::locale::facet::~facet () \[protected\], \[virtual\]

Facet destructor.

References **facet()**.

## Author

Generated automatically by Doxygen for libstdc++ from the source code.
