다음을 통해 공유


facet Class

A class that serves as the base class for all locale facets.

class facet {
protected:
   explicit facet(
      size_t _Refs = 0
);
   virtual ~facet( );
private:
   facet(const facet&)           // not defined
   void operator=(const facet&)  // not defined
   };

Remarks

Note that you cannot copy or 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.

Requirements

Header: <locale>

Namespace: std

See Also

Reference

locale Class

Thread Safety in the Standard C++ Library

Other Resources

locale Members