
John Maddock <john <at> johnmaddock.co.uk> writes:
Anthony Williams wrote:
There's more uses of BOOST_HAS_THREADS, but looking at them (including those in the regex headers), it seems to me that BOOST_HAS_THREADS really ought to be defined for a multi-threaded build, even if /Za is specified, otherwise the code won't be thread-safe.
Code that depends on <windows.h> will break if /Za is specified, but that's a separate issue to BOOST_DISABLE_THREADS. I'm not suggesting we should be able to *build* boost with /Za, just use it.
I would prefer not to make this change to Boost.Config for 1.35, but we should try to find a decent way of handling this.
I was thinking that we didn't fix this in 1.34, so we ought to try and fix it in 1.35.
Well, how about you run the full regressions tests with /Za both with and without the config changes and see what happens?
OK, I've done that. As expected, you can't build boost with /Za, but if you build boost without /Za, and build the tests with /Za (with or without the patch) then lots of tests do run successfully. Unfortunately, lots of other tests fail to compile. Some (such as libs/thread/test/test_tss.cpp) include <windows.h> in the test, but others don't compile because the boost headers change if /Za is specified, and some functionality is no longer available. There are a few tests that pass without the patch and fail to compile with the patch, but there are only a handful of these. I'll investigate further. Anthony