A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.com/use_facet below:

function template

<locale>

std::use_facet
template <class Facet> const Facet& use_facet (const locale& loc);

Access facet of locale

Returns a reference to facet Facet of locale loc.

If the facet is not present in the locale, the function throws a bad_cast exception.

The function has_facet can be used to check if a locale has a particular facet present before attempting to use it with this function.



Parameters
loc
locale object.

The template parameter Facet shall be a facet type.
A facet type is a type publicly derived (directly or indirectly) from locale::facet with a static member id of type locale::id, such as the standard facets collate, codecvt, ctype, messages, moneypunct, money_get, money_put, numpunct, num_get, num_put, time_get and time_put.

Return type A const-qualified reference to the facet object.

Data races Argument loc is accessed, and the returned object may be used to access facet object.

Exception safetyStrong guarantee: if an exception is thrown, there are no changes in loc.

See also
has_facet
Check if locale has facet (function template)
locale::facet
Locale facet (public member class)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4