Standard C++ Library Reference ISO/IEC (VERSION3)
locale::locale
locale();
explicit locale(const char *locname);
locale(const locale& loc, const locale& other,
category cat);
locale(const locale& loc, const char *locname, category cat);
template<class Facet>
locale(const locale& loc, Facet *fac);
The first constructor initializes the object to match the global locale. The second constructor initializes all the locale
categories to have behavior consistent with the locale name locname. The remaining constructors copy loc, with the
exceptions noted:
locale(const locale& loc, const locale& other,
category cat);
replaces from other those facets corresponding to a category C for which C & cat is nonzero.
locale(const locale& loc, const char *locname, category cat);
replaces from locale(locname, all) those facets corresponding to a category C for which C & cat is nonzero.
template<class Facet>
locale(const locale& loc, Facet *fac);
replaces in (or adds to) loc the facet fac, if fac is not a null pointer.
If a locale name locname is a null pointer or otherwise invalid, the function throws runtime_error.
locale::name
string name() const;
The member function returns the stored locale name.
locale::operator!=
bool operator!=(const locale& right) const;
The member function returns !(*this == right).
locale::operator()
template<class Elem, class Tr, class Alloc>
bool operator()(const basic_string<Elem, Tr, Alloc>& left,
const basic_string<Elem, Tr, Alloc>& right);
The member function effectively executes:
const collate<Elem>& fac = use_fac<collate<Elem> >(*this);
return (fac.compare(left.begin(), left.end(),
right.begin(), right.end()) < 0);
Thus, you can use a locale object as a function object.
locale::operator==
bool operator==(const locale& right) const;
The member function returns true only if *this and right are copies of the same locale or have the same name (other
than "*").