[Development] RFC: handling of C++ feature test macros

Ville Voutilainen ville.voutilainen at gmail.com
Thu Sep 19 14:56:59 CEST 2019

On Wed, 18 Sep 2019 at 09:28, Lars Knoll <lars.knoll at qt.io> wrote:
> > On 18 Sep 2019, at 01:37, Thiago Macieira <thiago.macieira at intel.com> wrote:
> >
> > On Tuesday, 17 September 2019 16:05:34 PDT Giuseppe D'Angelo via Development
> > wrote:
> >> While I agree that at the moment it has virtually never happened, it
> >> doesn't mean it couldn't happen in the future. Even today we have
> >> compilers such as MSVC with "living on the edge" compile flags
> >> (/c++latest). Our users can use those, and thus potentially trigger
> >> codepaths that on their specific compiler version are implemented in a
> >> pre-Standard way.
> >>
> >> So, how academic (I think should I say paranoid...) do we want to be?
> >
> > Marc's proposal is that we should accept that these things are rare and simply
> > correct when they do happen. Since our code is tested with the currently
> > latest versions of all compilers, we're fairly sure that any such macro works
> > with the compilers that currently support the feature.
> >
> > When a new compiler comes out with the feature, we may get compilation errors.
> > Our users understand that we cannot test things that don't exist, so older
> > versions can fail to compile on new compilers (or produce a lot of warnings).
> > Issuing fixes is enough.
> I agree. No point in doing lots of additional work preemptively. Let’s fix them when they occur.

I think Peppe's concern, while somewhat theoretical, is a valid one.
I'll talk to SG10 about this so that
we hopefully never run into the problem in practice.

More information about the Development mailing list