Boost logo

Boost :

From: Daniel Frey (d.frey_at_[hidden])
Date: 2008-04-17 11:45:58


On Thu, 2008-04-17 at 18:04 +0300, Peter Dimov wrote:
> Daniel Frey wrote:
>
> > Although it's a breaking change, it seems cleaner and more powerful to
> > me. Peter, what's your point of view on this type of breaking change
> > to enable_shared_from_this' interface? Do you seriously consider it?
>
> We need to keep in mind that std::tr1::enable_shared_from_this and
> std::enable_shared_from_this are still specified in the "old way", so it
> seems to me that even if we decide to go ahead with this change, we still
> have to keep the 1.35-like base class for compatibility with TR1 and C++0x.

I think it's possible to have shared_from_this_base (one plain pointer
overhead, not a template), which can be used with either the free
function boost::shared_from_this(x) or as a base class for
enable_shared_from_this (template, 1.35.0 or trunk version). The 1.35.0
version would then specialize sp_accept_owner, store the plain pointer
and shared_from_this() could call the free function in it's
implementation.

As an experiment, should I start to commit small chunks into trunk? I
have most things in my local copy of trunk anyway. If you monitor the
changes, we could revert them if you object to something (which is a
truly object oriented approach ;)

Regards, Daniel


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk