Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2003-02-27 15:09:21


Michael Brinkmann wrote:
> Hi,
>
> In my opinion, the call "shared_from_this(T* p)" in the file
> "boost/shared_ptr.hpp"
> is meant to be "shared_from_this(T const* p)"
>
> Am I right?

No. ;-)

template<class T> shared_ptr<T> shared_from_this(T * p);

When shared_from_this is called with a pointer to non-const X, it will
return shared_ptr<X>. When called with X const *, it will return
shared_ptr<X const>.

This function has been removed in the upcoming 1.30 release; the
functionality is now provided by a base class enable_shared_from_this.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net