> > I'm not sure but did I read somewhere that you shouldn't derive a
> > class
> from a templated (base) class??
>
> It has nothing to do with templated base classes. You shouldn't
> inherit from STL classes as they don't have virtual destructors.

That is, of course, if you would ever delete the object through its base
class pointer.  You may also consider private inheritance as well, which is
not dangerous with non-virtual base class dtors.

> If you feel the need, stop and use aggregation instead.

Also keep private inheritance in mind, which may be more (syntactically)
convenient than aggregation in some cases.

-------------
Ehsan Akhgari

Farda Technology (http://www.farda-tech.com/)

List Owner: [EMAIL PROTECTED]

[ Email: [EMAIL PROTECTED] ]
[ WWW: http://www.beginthread.com/Ehsan ]

And if great things have been a failure with you, have you yourselves
therefore- been a failure? And if you yourselves have been a failure, has
man therefore- been a failure? If man, however, has been a failure: well
then! never mind!
-Thus Spoke Zarathustra, F. W. Nietzsche





Reply via email to