
John Maddock wrote:
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. - Volodya