M
MikeP
SGI STL's slist derives from a base class which has a private constructor
and destructor, no doubt to enforce that the base class is not useable by
itself. slist then uses private inheritance from the base class. Would
declaring the constructor and destructor of the base class protected and
deriving slist from the base using public inheritance accomplish the same
thing? And why bother giving the other member functions (erase_after) of
the base class other access control when the constructor and destructor
are already private?
and destructor, no doubt to enforce that the base class is not useable by
itself. slist then uses private inheritance from the base class. Would
declaring the constructor and destructor of the base class protected and
deriving slist from the base using public inheritance accomplish the same
thing? And why bother giving the other member functions (erase_after) of
the base class other access control when the constructor and destructor
are already private?