- #1
sbrothy
Gold Member
- 455
- 356
I'm not a newbee to C++ but I've been out of the loop for a while.
I know it's discouraged, if not directly a no-go, to derive from STL classes. Something that has to do, if I remember correctly, with the STL classes having no virtual destructors.
It will work in the short run but may explode in your face later if you don't know exactly what you're doing.
With std::exception (and std::runtime_error), however, which does actually have virtual destructor(s) this practice should be OK though, right?
Regards.
I know it's discouraged, if not directly a no-go, to derive from STL classes. Something that has to do, if I remember correctly, with the STL classes having no virtual destructors.
It will work in the short run but may explode in your face later if you don't know exactly what you're doing.
With std::exception (and std::runtime_error), however, which does actually have virtual destructor(s) this practice should be OK though, right?
Regards.