30 Localization library [localization]

30.3 Locales [locales]

30.3.2 locale globals [locale.global.templates]

template<class Facet> const Facet& use_facet(const locale& loc);
Mandates: Facet is a facet class whose definition contains the public static member id as defined in [locale.facet].
Returns: A reference to the corresponding facet of loc, if present.
Throws: bad_cast if has_facet<Facet>(loc) is false.
Remarks: The reference returned remains valid at least as long as any copy of loc exists.
template<class Facet> bool has_facet(const locale& loc) noexcept;
Returns: true if the facet requested is present in loc; otherwise false.