Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

has_facet


Locale Function

Summary

A function template used to determine if a locale has a given facet.

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

None

Synopsis

#include <locale>
template <class Facet> bool has_facet(const locale&) throw();

Description

has_facet returns true if the requested facet is available in the locale. Otherwise it returns false. You specify the facet type by explicitly including the template parameter (see the example below).

Note that if your compiler cannot overload function templates on return type, then you need to use an alternative has_facet template. The alternative template takes an additional argument that's a pointer to the type of facet you want to check on. The declaration looks like this:

The example below shows the use of both variations of has_facet.

Example

See Also

locale, facets, use_facet



Previous fileTop of documentContentsIndexNext file
©Copyright 1998, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.
OEM Release, June 1998