Boost logo

Boost :

Subject: Re: [boost] BOOST_NO_CXX11_ATOMIC?
From: Rob Stewart (robertstewart_at_[hidden])
Date: 2013-12-02 05:20:29


On Dec 1, 2013, at 8:06 AM, "Peter Dimov" <lists_at_[hidden]> wrote:

> 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.

You and Beman have now each stated the opposite. Examples are needed to reinforce the claims. I'll try to look later, but others can easily beat me to it.

> 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.

I think Beman has it right, but I can't prove it ATM.

> 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.

That is the pattern for older headers, but I thought it changed for C++11.

___
Rob

(Sent from my portable computation engine)


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