---
name: "std::locale_facet"
section: "3cxx"
platform: "linux"
package: "libstdc++-12-doc"
version: "12.4.0-5"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/std::locale_facet/3cxx"
---

# std::locale\_facet(3cxx)

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::\_\_ctype\_abstract\_base\< wchar\_t \>**, **std::\_\_codecvt\_abstract\_base\< \_InternT, \_ExternT, \_StateT \>**, **std::\_\_ctype\_abstract\_base\< \_CharT \>**, std::\_\_moneypunct\_cache\< \_CharT, \_Intl \>, std::\_\_numpunct\_cache\< \_CharT \>, std::\_\_timepunct\< \_CharT \>, std::\_\_timepunct\_cache\< \_CharT \>, **std::collate\< \_CharT \>**, **std::ctype\< char \>**, **std::messages\< \_CharT \>**, **std::money\_get\< \_CharT, \_InIter \>**, **std::money\_put\< \_CharT, \_OutIter \>**, **std::moneypunct\< \_CharT, \_Intl \>**, **std::num\_get\< \_CharT, \_InIter \>**, **std::num\_put\< \_CharT, \_OutIter \>**, **std::numpunct\< \_CharT \>**, **std::time\_get\< \_CharT, \_InIter \>**, and **std::time\_put\< \_CharT, \_OutIter \>**.

### 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.

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

Facet destructor.

## Author

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