> I believe publicly deriving a class would be a bad idea. Since vector<>
> no virtual destructor, the result of deleting your derived class using a
> base class pointer is undefined.
But is that something you are likely to do? Have you ever felt the need
to allocate a vector<> with new? I haven't.
Further, the changes recommended should not involve adding any data
member, not requiring any destruction beyond what is offered in the base
class dtor. So, while it may be officially undefined, it's almost certainly
Sometime you just have to acknowledge the difference between "writing
robust code" and "pointlessly tying your hands".