[Patch] Add C++14 feature querying macro `cxx_digit_separators` describing support for "Single-Quotation-Mark as a Digit Separator"
richard at metafoo.co.uk
Wed Oct 22 11:06:30 PDT 2014
On Tue, Oct 21, 2014 at 1:04 AM, Michel Morin <mimomorin at gmail.com> wrote:
> The support for C++14 digit separators was already added in Clang 3.4.
> But there is no querying macro for the feature.
> I've attached a patch for adding the macro.
The patch looks good to me, but I have a more general question before we go
ahead with this: should we continue to add Clang-specific __has_feature
tests for features that are covered by C++'s SD-6 feature test
recommendations? Per the latest working draft of SD-6, the portable,
cross-compiler way to check for digit separators is
#if __cpp_digit_separators >= 201309L
... and there seems to be no reason for portable code to use __has_feature
for this check.
(That said, I *can* see an argument for supporting __has_extension for such
features in general... though perhaps not for this one, since it would not
be a conforming extension in C++11.)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-commits