>>>>> Branko Čibej <br...@xbc.nu>:

> std::string also doesn't have any virtual functions, nor does a bool
> member require a destructor. Memory deallocation is OK. std::string is
> actually a POD and tricky rules apply that allow you do do this
> safely, IIRC ...

Nevertheless, deleting a derived object from a base class pointer, when
there isn't a virtual constructor has undefined behaviour.

And IMO venturing into a language's undefined behaviour area is not a
good choice for a public API.

Reply via email to