[PATCH] c++: Add support for -std=c++2b

Jonathan Wakely jwakely.gcc@gmail.com
Fri Jan 8 08:55:33 GMT 2021


On Fri, 8 Jan 2021, 00:50 Paul Fee via Libstdc++, <libstdc++@gcc.gnu.org>
wrote:

> Derived from the changes that added C++2a support in 2017.
> https://gcc.gnu.org/g:026a79f70cf33f836ea5275eda72d4870a3041e5
>
> No C++2b features are added here.
> Use of -std=c++2b sets __cplusplus to 202101L.
>

I wonder if 202100L would be better, as is obviously not a real date, but
it's still greater than the value for C++20. We didn't do that for C++2a
though.




>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 5541e694bb3..3a0d452b62b 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,10 @@
> +2021-01-08  Paul Fee  <paul.f.fee@gmail.com>
> +
> +    Add support for -std=c++2b
> +    * doc/cpp.texi (__cplusplus): Document value for -std=c++2b
> +    or -std=gnu+2b.
> +    * doc/invoke.texi: Document -std=c++2b and -std=gnu++2b.
>

Do not patch the changelog files. Since last year they are automatically
edited by a nightly script, using the content of the git commit message. So
you should put the changelog entries in your commit message instead. See
any commits on the master branch for examples.

I only skimmed the rest of the patch but it looks ok to me.


More information about the Libstdc++ mailing list