From: "Nicola Musatti" <[EMAIL PROTECTED]> > David Abrahams wrote: > > "Peter Dimov" <[EMAIL PROTECTED]> writes: > [...] > >>Of course you could do that as well, but my point is that the primary > >>purpose of make_* functions is argument deduction, and the primary purpose > >>of make_shared/get_shared_ptr is to support the idiom above, where argument > >>deduction isn't important. > > > > > > So what about as_shared or to_shared? > > Why not just 'share' ?
Because it doesn't share... that is partly why I don't like make_shared, too. It doesn't make the object shared. It only retrieves a pointer to an object that is already "shared". An alternative is to use a member function. In http://www.usenix.org/publications/library/proceedings/c++94/full_papers/ell is.a Ellis and Detlefs use wp.Pointer() for the weak to strong operation. _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost