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


Library:  Localization


Local Index

No Entries


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


#include <locale>

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


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.


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