Boost logo

Boost :

From: John Maddock (john_at_[hidden])
Date: 2004-06-28 10:50:53


> > > BTW, I was told that if boost/config.hpp is included before any system
> > > headers, it will still be able to use _REENTRANT to detect if -pthread
> > > was specified on the command line.
> >
> > Yep, but if -pthread is specified on the command line, then presumably
the
> > user really does want thread safe code :-)
>
> Right. The current problem is that _REENTRANT is always defined by
libstdc++
> headers, so we can't use it to detect if user has specified -pthread.
> However, if boost/config.hpp is included before system headers and checks
for
> _REENTRANT before including system headers on its own, it can reliably
check
> if -pthread was specified. Of course, the requirements to include
> boost/config.hpp before everything else is a drastic one.

Sorry, I misunderstood you: that was what the fix to libstdcpp3.hpp was for:
it checks to see if libstdc++ is multithreaded and then sets Boost to the
same default. This results in consistent behaviour irrespective of what
headers you include and in what order you include them, but at the possible
expense of turning on threading support when you don't really need it. It's
not ideal, but it's going to have to suffice for 1.33.

John.


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