libstdc++

Classes | Functions
Locales

## Classes

class | std::codecvt< _InternT, _ExternT, _StateT >
| Primary class template codecvt.NB: Generic, mostly useless implementation. More...
class | std::ctype< _CharT >
| Primary class template ctype facet.This template class defines classification and conversion functions for character sets. It wraps cctype functionality. Ctype gets used by streams for many I/O operations. More...
class | std::ctype< char >
| The ctype<char> specialization.This class defines classification and conversion functions for the char type. It gets used by char streams for many I/O operations. The char specialization provides a number of optimizations as well. More...
class | std::ctype< wchar_t >
| The ctype<wchar_t> specialization.This class defines classification and conversion functions for the wchar_t type. It gets used by wchar_t streams for many I/O operations. The wchar_t specialization provides a number of optimizations as well. More...
class | std::locale
| Container class for localization functionality.The locale class is first a class wrapper for C library locales. It is also an extensible container for user-defined localization. A locale is a collection of facets that implement various localization features such as money, time, and number printing. More...
class | std::locale::facet
| 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. More...
class | std::locale::id
| Facet ID class.The ID class provides facets with an index used to identify them. Every facet class must define a public static member locale::id, or be derived from a facet that provides this member, otherwise the facet cannot be used in a locale. The locale::id ensures that each class type gets a unique identifier. More...
class | std::messages< _CharT >
| Primary class template messages.This facet encapsulates the code to retrieve messages from message catalogs. The only thing defined by the standard for this facet is the interface. All underlying functionality is implementation-defined. More...
struct | std::messages_base
| Messages facet base class providing catalog typedef. More...
class | std::money_base
| Money format ordering data.This class contains an ordered array of 4 fields to represent the pattern for formatting a money amount. Each field may contain one entry from the part enum. symbol, sign, and value must be present and the remaining field must contain either none or space. More...
class | std::money_get< _CharT, _InIter >
| Primary class template money_get.This facet encapsulates the code to parse and return a monetary amount from a string. More...
class | std::money_put< _CharT, _OutIter >
| Primary class template money_put.This facet encapsulates the code to format and output a monetary amount. More...
class | std::moneypunct< _CharT, _Intl >
| Primary class template moneypunct.This facet encapsulates the punctuation, grouping and other formatting features of money amount string representations. More...
class | std::num_get< _CharT, _InIter >
| Primary class template num_get.This facet encapsulates the code to parse and return a number from a string. It is used by the istream numeric extraction operators. More...
class | std::num_put< _CharT, _OutIter >
| Primary class template num_put.This facet encapsulates the code to convert a number to a string. It is used by the ostream numeric insertion operators. More...
class | std::numpunct< _CharT >
| Primary class template numpunct.This facet stores several pieces of information related to printing and scanning numbers, such as the decimal point character. It takes a template parameter specifying the char type. The numpunct facet is used by streams for many I/O operations involving numbers. More...
class | std::time_base
| Time format ordering data.This class provides an enum representing different orderings of time: day, month, and year. More...
class | std::time_get< _CharT, _InIter >
| Primary class template time_get.This facet encapsulates the code to parse and return a date or time from a string. It is used by the istream numeric extraction operators. More...
class | std::time_put< _CharT, _OutIter >
| Primary class template time_put.This facet encapsulates the code to format and output dates and times according to formats used by strftime(). More...

## Functions

template<typename _Facet >
bool | std::has_facet (const locale &__loc) throw ()
template<typename _Facet >
const _Facet & | std::use_facet (const locale &__loc)

## Detailed Description

Classes and functions for internationalization and localization.

## Function Documentation

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

  __loc | The locale to test.

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

  __loc | The locale to use.

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.