
17 May
2010
17 May
'10
11:15 p.m.
On 17/05/2010 11:20 PM, Frank Mori Hess wrote:
Are you saying you want to have a covariant return types with shared_ptr?
Among other things, yes. But the bulk of my message was effectively suggesting replacing enable_shared_from_this{2} with enable_shared_from_any to allow safe creation of shared_ptrs from any pointer to an object that inherits from enable_shared_from_any. I have not tested your specific example, but it looks a lot like one of the many attempts we have made in the past to return covariant pointers. AFAICT, for good reasons, it is just not possible.