Subject: Re: [boost] BOOST_NO_CXX11_ATOMIC?
From: Peter Dimov (lists_at_[hidden])
Date: 2013-12-01 08:06:02
Rob Stewart wrote:
> Add feature macros and test for them. The macros can be defined when the
> header is fully supported or for particular compilers.
If you're agreeing with Beman that BOOST_NO_CXX11_HDR_ATOMIC should not be
defined when <atomic> is not 100% conforming, then I disagree.
We do not have a practice of saying, via macros, that a header isn't
present, and then saying, via other macros, that it actually is.
BOOST_NO_CXX11_HDR_ATOMIC means that #include <atomic> would fail. Not
defining it when the header is present but not useful, while a typical
practice for us, is not the right thing to do when libraries disagree on
whether the header is useful.
When a header contains more than one feature, and some of them may be
present while others may not be, we supply feature macros instead of a
header macro. The lack of BOOST_NO_CXX11_ATOMIC_FEATURE means that #include
<atomic> would work and provide $FEATURE.