
27 Feb
2005
27 Feb
'05
11:48 a.m.
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. Daniel