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.