Boost logo

Boost :

Subject: Re: [boost] Another set of macros to deprecate (and then remove)?
From: Marshall Clow (mclow.lists_at_[hidden])
Date: 2012-12-14 11:52:29


On Dec 14, 2012, at 8:38 AM, Steve M. Robbins <steve_at_[hidden]> wrote:

> On Thu, Dec 13, 2012 at 07:53:06AM -0800, Marshall Clow wrote:
>> There are a set of macros in Boost.config that describe "features that are not required by the C++ standard"
>>
>> Some of these features have been incorporated into C++11.
>>
>> I propose that we retire these macros, and have people use the shiny C++11 versions.
>>
>> In particular:
>> BOOST_HAS_STATIC_ASSERT should be ! BOOST_NO_CXX11_ASSERT
>
> I'm curious why Boost is changing from a positive macro "system has
> feature X" to a negative one. Of the two options:
>
> #ifdef BOOST_HAS_X
> ...
>
> or
>
> #ifndef BOOST_NO_X
> ...
>
>
> I personally find the former much easier to read and the latter
> double-negative version awkward enough to be error prone. Am I alone
> in this opinion?

Here's my understanding, based on reading the docs at:
        http://www.boost.org/doc/libs/1_52_0/libs/config/doc/html/boost_config/boost_macro_reference.html

For things that are in the standard, we note their absence.
        For example: BOOST_NO_STDC_NAMESPACE and BOOST_NO_CXX11_RVALUE_REFERENCES

For optional (extra?) language/library features, we note their presence
        BOOST_HAS_TR1 or BOOST_HAS_SGI_TYPE_TRAITS

The macros that I am proposing deprecating were once "extra" language/library features, but have become part of the C++11 standard, and already have equivalents of the BOOST_NO_XXX variety. I'd really rather not have two different macros that describe the same thing.

Besides, no one is using them in boost, anyway ;-)

-- Marshall

Marshall Clow Idio Software <mailto:mclow.lists_at_[hidden]>

A.D. 1517: Martin Luther nails his 95 Theses to the church door and is promptly moderated down to (-1, Flamebait).
        -- Yu Suzuki


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