Boost logo

Boost Users :

Subject: Re: [Boost-users] conflicting intmax_t definitions - Boost 1.53 and gcc 4.8 incompatibility?
From: John M. Dlugosz (ngnr63q02_at_[hidden])
Date: 2014-01-26 21:08:29


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


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net