Standard C++ Library Reference ISO/IEC (VERSION3)

locale::classic
static const locale& classic();
The static member function returns a locale object that represents the classic locale, which behaves the same as the C
locale within the Standard C library.
locale::combine
template<class Facet>
locale combine(const locale& loc) const;
The member function returns a locale object that replaces in (or adds to) *this the facet Facet listed in loc.
locale::facet
class facet {
protected:
explicit facet(size_t refs = 0);
virtual ~facet();
private:
facet(const facet&) // not defined
void operator=(const facet&) // not defined
};
The member class serves as the base class for all locale facets. Note that you can neither copy nor assign an object of
class facet. You can construct and destroy objects derived from class locale::facet, but not objects of the base
class proper. Typically, you construct an object myfac derived from facet when you construct a locale, as in:
locale loc(locale::classic(), new myfac);
In such cases, the constructor for the base class facet should have a zero refs argument. When the object is no longer
needed, it is deleted. Thus, you supply a nonzero refs argument only in those rare cases where you take responsibility
for the lifetime of the object.
locale::global
static locale global(const locale& loc);
The static member function stores a copy of loc as the global locale. It also calls setlocale( LC_ALL,
loc.name. c_str()), to establishing a matching locale within the Standard C library. The function then returns the
previous global locale. At program startup, the global locale is the same as the classic locale.
locale::id
class id {
protected:
id();
private:
id(const id&) // not defined
void operator=(const id&) // not defined
};
The member class describes the static member object required by each unique locale facet. Note that you can neither
copy nor assign an object of class id.