[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 18:01:01 PDT 2014


On Thu, Oct 23, 2014 at 5:43 PM, Michel Morin <mimomorin at gmail.com> wrote:

> Richard Smith wrote:
> > Please also update the documentation to suggest using this macro
> > to detect the feature.
>
> I updated LanguageExtensions.rst for `__has_feature(cxx_digit_separators)`
> in
> cxx_digit_separators.patch (the patch in the first mail):
>
> +C++1y digit separators
> +^^^^^^^^^^^^^^^^^^^^^^
> +
> +Use ``__has_feature(cxx_digit_separators)`` or
> +``__has_extension(cxx_digit_separators)`` to determine if support for
> +digit separators using single quotes (for instance, ``10'000``) is
> enabled.
>
> Do you mean adding the suggestion of using `__cpp_digit_separators` to
> the above description, like
>
> +Use ``__has_feature(cxx_digit_separators)``,
> +``__has_extension(cxx_digit_separators)`` or
> +``__cpp_digit_separators >= 201309`` to determine if support for
> +digit separators using single quotes (for instance, ``10'000``) is
> enabled.
>
> or updating other place?
>

I don't see a reason to suggest anyone ever uses
__has_feature(cxx_digit_separators) since we have the more-portable SD-6
macro. I was thinking we should just say:

  Use ``__cpp_digit_separators`` to determine if support for digit
separators using single quotes (for instance ``10'000``) is enabled.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141023/17bb4c37/attachment.html>


More information about the cfe-commits mailing list