Boost logo

Boost :

Subject: Re: [boost] [config] Rethinking feature macros?
From: Peter Dimov (lists_at_[hidden])
Date: 2017-11-06 17:02:35

Andrey Semashev wrote:
> >> g++-7 will be out of wide use by then, so it doesn't matter.
> >
> > That's not true on at least three levels.
> Why?


1. C++17 still matters even if g++-15 -std=c++17 is used instead of
g++-7 -std=c++17;
2. g++-7 will not be out of wide use as today we still have to care about
g++ 4.4;
3. Even if a compiler is out of wide use, we still maintain Config for it.

> >> > The good thing about positive macros is that an old compiler never
> >> > needs maintenance. With negative macros you have to keep adding them
> >> > to it.
> >>
> >> That is not more maintenance than adding positive macros for newer
> >> compilers.
> >
> > It is. Maintaining the new compilers is constant regardless of the macro
> > type, and maintaining the old compilers is only required for negative
> > macros.
> 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.

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.

Boost list run by bdawes at, gregod at, cpdaniel at, john at