Earlier I asked a question about inheriting std:
riority_queue<>. It
seems that priority_queue is designed to be inherited (as it has
protected members), even though it has no virtuals.
There are many reasons to inherit, even if something has no virtuals,
such as adding new behavior, even though it doesn't modify existing
(Note that I was using private inheritance).
Blanket bans may not be a good thing.
Why inherit from a class which you cannot use polymorphically in the
first place?
Since the base class destructor is not virtual, it is not called when
your derived class is destroyed. I suppose one could call it
explicitly from the derived class' destructor, but this is hardly good
design. Likewise, since the member functions in std::list are not
virtual, you must not override them in the derived class because that
would hide the base class functions.
It is quite possible to implement what you want to do using
delegation, or containment -- your class has a data member of type
std::list, and you can write forwarding functions for any of the
std::list methods which you would like to use in your own class. I did
this once in order to extend std::string, which also has no virtual
destructor. It is a bit tedious to write all the one-liner functions
to forward to std::list, but at least you end up with something that
works properly.
Really, you shouldn't inherit from this one. Some STL classes are
designed for inheritance, such as std::exception (which DOES have a
virtual destructor).