[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: object-model: Return by value, reference or pointer? (or something else?)

From: Steinar Bang <sb_at_dod.no>
Date: Fri, 15 Oct 2010 11:45:00 +0200

>>>>> Branko Čibej <brane_at_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.
Received on 2010-10-15 11:45:51 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.