Reference
C Library
IOstream Library
Strings library
STL Containers
STL Algorithms
Miscellaneous
Miscellaneous
complex
exception
functional
iterator
limits
locale
memory
new
numeric
stdexcept
typeinfo
utility
valarray
locale
has_facet
isalnum
isalpha
iscntrl
isdigit
isgraph
islower
isprint
ispunct
isspace
isupper
isxdigit
locale
tolower
toupper
use_facet
standard facets:
codecvt
codecvt_base
codecvt_byname
collate
collate_byname
ctype
ctype_base
ctype_byname
messages
messages_base
messages_byname
moneypunct
moneypunct_byname
money_base
money_get
money_put
numpunct
numpunct_byname
num_get
num_put
time_base
time_get
time_get_byname
time_put
time_put_byname


has_facet

function template
<locale>
template <class Facet> bool has_facet ( const locale& loc ) throw();

Check if locale has facet

Returns whether facet Facet is present in locale loc.

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

true if Facet is a facet present in loc, false otherwise.

See also