Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2005-08-12 05:06:30

> If serialization depends upon BOOST_HAS_THREADS its totally unintentional
> on my part. I don't know where such a dependency would come from unless
> its shared_ptr which I only recently started to depend upon. I would like
> to see more information on this topic.

I just did a quick search for BOOST_HAS_THREADS: shared_count_132.hpp
changes the ABI of sp_counted_base depending on whether it's defined or not.
Whether that's an issue in practice I can't say, it depends on how that
class is used.

As for shared_ptr, it would indeed be useful to have more information, for
example can I link a multithreaded lib that contains an API returning
shared_ptr<foo> to a single threaded app? Looking at the source, it appears
that for most platforms the answer is "yes": as long as shared_ptr
recognises the platform and can use atomic increment/decrement operations,
then those operations will always be used (and the internal ABI's remain
unchanged as well). However it looks like there may be some platforms that
rely on BOOST_HAS_THREADS / BOOST_HAS_PTHREADS, and I'm guessing that their
ABI's will change. I'm not sure that this is the definitive answer


Boost list run by bdawes at, gregod at, cpdaniel at, john at