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:
http://software.intel.com/en-us/forums/showpost.php?p=160114

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
overlooking...
http://dl.dropbox.com/u/74751/cpp/boost/patches/boost-shared_ptr-intel-fix-20120421-0447.patch

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?

Thanks.


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