Boost logo

Boost Users :

Subject: Re: [Boost-users] [config] policy for setting BOOST_HAS_THREADS?
From: John Maddock (john_at_[hidden])
Date: 2008-11-11 04:49:39

> Hello,
> What is the policy by which BOOST_HAS_THREADS gets defined
> or not? I used to think this macro is somehow affected by the
> selection of a single-threaded or multithreaded runtime library
> as done in bjam with threading=single and threading=multi, but
> some experiments in Linux suggest that this is not the case,
> as discussed in the following thread:

It's set if the compiler and it's std lib is in thread safe mode. For gcc
it's either set or not depending upon how gcc with built (since there are no
compiler options that actually change the thread-safeness in recent gcc
releases: and yes I checked with the gcc and libstdc++ teams on that!). For
other compilers (for example msvc) it may be set or not depending on what
compiler options are used.

HTH, John.

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at