On 1/21/2014 4:31 PM, Gavin Lambert wrote:
On 22/01/2014 04:27, Quoth Leon Mlakar: worse, std::shared_ptr vs. boost::shared_ptr (as AFAIK there is no way to interop these without copying the underlying object, which breaks the semantics).
Hmm, there might be. Perhaps using a custom deleter with both, which knows about two masters. A forwarder could allow one shared_ptr to wrap another, but that would mean writing the forwarding stub implementation for the abstract interface. If the class is already using PIMPL or letter/envelopes or otherwise already has a forwarding thing already written, that would be a good way to do it. Why can't Boost simply be configured to have boost::shared_ptr be an alias for std::shared_ptr? Maybe it's time to move to using std::shared_ptr and have Boost's implementation only for Boost::TR1 . —John