A facet is a class describing a locale feature set associated to a specific cultural aspect.
Custom facets may be created by inheriting this member class (either directly or indirectly), and by containing a static member of type locale::id and a set of features as const-qualified member functions.
The copy constructor and copy assignment are deleted, preventing the copy of facet objects.
This base class basically implements a protected constructor that takes one parameter. This parameter, refs, shall be 0 (zero) if the facet has to be automatically destroyed when the last locale object containing that facet is destroyed, and 1 (one) if it does not have to.
Derived classes defining specific facets shall also have a constructor taking a refs parameter, which is passed to their base class.
A virtual destructor ensures proper destruction of derived objects.