Boost logo

Boost :

Subject: [boost] [shared_ptr] [intel] Compile Errors with '#include <atomic>'
From: Joshua Boyce (raptorfactor_at_[hidden])
Date: 2012-04-20 14:55:38

Intel's standard library headers are disgusting and are committing the
cardinal sin of defining macros which may interfere with user code (which
in this case they have).

The problem is simple to repro:

#include <atomic>
#include <boost/shared_ptr>
int main() { }

The problem has been reported previously, but even in the latest version of
the compiler (created and released well after the bug report) the problem
seems to remain:

Here is a patch which I have used locally to successfully work around the
problem, but I get the feeling that there is a better solution I'm

Has anyone else run into this problem who has come up with a better
solution? Alternatively, if this is as good as it's going to get (maybe
using a BOOST_WORKAROUND would be better so it can be disabled when/if the
issue is fixed), would anybody be able to apply this to trunk?


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