The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

facet Class


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

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

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.


Header: <locale>

Namespace: std