std::use_facet (3) - Linux Manuals
std::use_facet: std::use_facet
NAME
std::use_facet - std::use_facet
Synopsis
Defined in header <locale>
template< class Facet >
const Facet& use_facet( const std::locale& loc );
Obtains a reference to a facet implemented by loc.
Parameters
loc - the locale object to query
Return value
Returns a reference to the facet. The reference returned by this function is valid as long as any std::locale object exists that implements Facet.
Exceptions
std::bad_cast if std::has_facet<Facet>(loc) == false.
Example
Display the 3-letter currency name used by the user's preferred locale
// Run this code
Output:
See also
locale (class)
has_facet (function template)