Boost logo

Boost :

Subject: Re: [boost] cannot pass objects of non-POD type ‘class boost::detail::shared_count’ through ‘...’; call will abort at runtime
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2009-09-17 12:07:18


Stefan Strasser wrote:

> I wondered before why shared_count is an implementation detail.
> there are obviously use cases besides shared_ptr for this. one of those use
> cases is even endorsed by boost, by offering intrusive_ptr.
> and the implementation of shared_count has performance advantages over every
> portable solution possible, as its implemented compiler- and
> platform-specific for many combinations.
> so, why's shared_count an implementation detail?

You probably meant atomic_count? If so, it's not a part of shared_ptr,
although it's still a very useful tool indeed. I believe, it's still an
implementation detail in hope that there will appear a C++1x std::atomic
implementation one day.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk