Boost logo

Boost :

Subject: Re: [boost] [config] Rethinking feature macros?
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2017-11-06 17:20:39


AMDG

On 11/06/2017 10:02 AM, Peter Dimov via Boost wrote:
> Andrey Semashev wrote:
>>
>> I don't see how. You have to add new macros as they come with new C++
>> versions or someone requests them. You have to test them. All this is
>> the same amount of work regardless of whether the macro is positive or
>> negative.
>
> On an old compiler, you don't need to add new positive macros, so
> there's less work to do.
>

  We don't usually define macros independently for every compiler
version. The actual implementation generally looks like:

#if COMPILER_VERSION < NNN
  #define BOOST_NO_FEATURE
#endif

which is always the same amount of work regardless of whether
it's a positive or negative macro.

> On a new compiler, you either add the positive macro to -std=c++17 or
> add the negative macro to -std=c++14 and below, so the work is the same.
>

In Christ,
Steven Watanabe


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