smart_ptr/enable_shared_from_raw

9 Nov
2012
9 Nov
'12
5:17 p.m.
Hi, it's known that calling shared_from_this() in a constructor doesn't work. It seems that whenever this issue arises, people resort to creating a factory that first constructs the object and then calls an init function in which the user is free to call shared_from_this(). It seems though that there is a perfectly working enable_shared_from_raw class in the trunk since a couple of years now that allows the developer to call shared_from_raw(this) in a constructor. Are there plans of merging this into a release sometime? If not, is it safe to throw out the smart_ptr stuff of a release (I'm using 1.48.0 still) and replace it with the version from the trunk? Thanks, Andreas
4488
Age (days ago)
4488
Last active (days ago)
0 comments
1 participants
participants (1)
-
Andreas Beisler