---
name: "std::locale__Impl"
section: "3"
platform: "linux"
package: "libstdc++6-4.1-doc"
version: "4.1.1-21"
release: "Debian 4.0 (Etch)"
platforms: ["linux"]
url: "https://new.carta.tech/std::locale__Impl"
---

# std::locale\_\_Impl(3)

## NAME

std::locale::\_Impl -

## SYNOPSIS

## Detailed Description

Definition at line 473 of file locale\_classes.h.

### Friends

struct **\_\_use\_cache**\
 template\<typename \_Facet\> bool **has\_facet** (const **locale** &)  throw ()\
 class **locale**\
 class **locale::facet**\
 template\<typename \_Facet\> const \_Facet & **use\_facet** (const **locale** &)\

## Friends And Related Function Documentation

### bool has\_facet (const locale & \_\_loc) throw ()` [friend]`

Test for the presence of a facet.

has\_facet tests the locale argument for the presence of the facet type provided as the template parameter. Facets derived from the facet parameter will also return true.

**Parameters:**

*Facet* The facet type to test the presence of. \
 *locale* The locale to test.

**Returns:**

true if locale contains a facet of type Facet, else false.

Definition at line 88 of file locale\_facets.tcc.

### const \_Facet& use\_facet (const locale & \_\_loc)` [friend]`

Return a facet.

use\_facet looks for and returns a reference to a facet of type Facet where Facet is the template parameter. If has\_facet(locale) is true, there is a suitable facet to return. It throws **std::bad\_cast** if the locale doesn't contain a facet of type Facet.

**Parameters:**

*Facet* The facet type to access. \
 *locale* The locale to use.

**Returns:**

Reference to facet of type Facet.

**Exceptions:**

**std::bad\_cast if locale doesn't contain a facet of type Facet.**

**Definition at line 110 of file locale\_facets.tcc.**

## Author

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