
17 Sep
2009
17 Sep
'09
4:07 p.m.
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.