boost 1.29.0: shared_from_this with const argument
27 Feb
2003
27 Feb
'03
4:46 p.m.
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? kind regards Michael
27 Feb
27 Feb
8:09 p.m.
New subject: [Boost-Users] boost 1.29.0: shared_from_this with const argument
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.
7944
Age (days ago)
7944
Last active (days ago)
1 comments
2 participants
participants (2)
-
Michael Brinkmann
-
Peter Dimov