C++ Logo

sg10

Advanced search

Re: [SG10] First draft recommendation for C++14

From: Nelson, Clark <clark.nelson_at_[hidden]>
Date: Sun, 5 May 2013 03:08:32 +0000
> > Which of these is the behavior we want for these feature-test macros?
> In my experience, __has_feature(X) is what you want when determining
> whether to use a language feature in normal code, but __has_extension(X)
> is what you want when determining whether to use a language feature in a
> system header.
>
> FWIW, I have always taken the view that, when an implementer implements
> a feature, he should define the macro.

I hit "Send" a little too fast on this one. I should have said something more like, "When an implementer implements a feature, he should arrange for the macro to be defined in the same circumstances under which he supports the feature." -- for example, under the control of the same command-line option(s).

Clark

Received on 2013-05-05 05:08:52