27 Feb
2003
27 Feb
'03
8:09 p.m.
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.