Boost logo

Boost :

From: Daniel James (daniel_at_[hidden])
Date: 2005-02-27 06:48:43

christopher diggins wrote:

> Another approach perhaps would be to create inheritable versions of the
> STL containers which are thin wrappers which simply provide a virtual
> destructor. Would this not work as well?

You'd also need to think about making all the member functions virtual
as well. And consider operator overloading. But it could work.

But the STL way to do this is to use the iterators for polymorphism -
not the container. That way it won't matter if your class isn't
substitutable for std::vector.

The OOTL way is up to you.


Boost list run by bdawes at, gregod at, cpdaniel at, john at