|
| template<typename _Facet > |
| bool | std::has_facet (const locale &__loc) throw () |
| |
| template<typename _Facet > |
| const _Facet & | std::use_facet (const locale &__loc) |
| |
Classes and functions for internationalization and localization.
template<typename _Facet >
| bool std::has_facet |
( |
const locale & |
__loc | ) |
throw () |
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.
- Template Parameters
-
| _Facet | The facet type to test the presence of. |
- Parameters
-
- Returns
- true if
__loc contains a facet of type _Facet, else false.
Definition at line 104 of file locale_classes.tcc.
template<typename _Facet >
| const _Facet & std::use_facet |
( |
const locale & |
__loc | ) |
|
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.
- Template Parameters
-
| _Facet | The facet type to access. |
- Parameters
-
- Returns
- Reference to facet of type Facet.
- Exceptions
-
| std::bad_cast | if __loc doesn't contain a facet of type _Facet. |
Definition at line 132 of file locale_classes.tcc.