Previous fileTop of DocumentContentsIndex pageNext file
Apache C++ Standard Library Reference Guide

use_facet()

Library:  Localization


Function

Local Index

No Entries

Summary

A template function used to obtain a facet from a specific locale

Synopsis

#include <locale>

namespace std {
  template<class Facet> const Facet& use_facet(const locale&);
}

Description

use_facet() returns a reference to the corresponding facet contained in the locale argument. You specify the facet type by explicitly including the template parameter (see the example below). If that facet is not present, then use_facet() throws bad_cast. Otherwise, the reference remains valid for as long as any copy of the locale exists.

Example

See Also

locale, Facets, has_facet()

Standards Conformance

ISO/IEC 14882:1998 -- International Standard for Information Systems -- Programming Language C++, Section 22.1.1



Previous fileTop of DocumentContentsIndex pageNext file