[Patch] Add C++14 feature querying macro `cxx_digit_separators` describing support for "Single-Quotation-Mark as a Digit Separator"

Richard Smith richard at metafoo.co.uk
Thu Oct 23 15:41:24 PDT 2014

On Thu, Oct 23, 2014 at 7:44 AM, Michel Morin <mimomorin at gmail.com> wrote:

> Richard Smith wrote:
> > 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?
> [...]
> > ... and there seems to be no reason for portable code to use
> __has_feature
> > for this check.
> Ah, I didn't realize that Clang has implemented SD-6 feature-test macros.
> (I'll update Clang's config in Boost.Config to use them.)
> So it makes sense to provide only SD-6 macros. But, for C++14 features,
> I would think having __has_feature macros would be better. For TS and C++1z
> features, I don't think it's necessary to provide __has_feature macros.
> Patch for __cpp_digit_separators attached.

Please also update the documentation to suggest using this macro to detect
the feature.

Other than that, the patch looks good to me, with the proviso that this is
subject to change if the new revision of SD-6 does not get voted into the
standard in Urbana. Since we won't be releasing a Clang with this change
until after then, I'm happy with this being checked in now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/6decba1f/attachment.html>

More information about the cfe-commits mailing list