From: Jonathan Wakely Date: Thu, 23 Apr 2020 16:20:47 +0000 (+0100) Subject: libstdc++: Define missing __cpp_lib_int_pow2 macro X-Git-Tag: misc/first-auto-changelog-9~94 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e29964838b08dd7c0113582620b61505d2ee6c68;p=thirdparty%2Fgcc.git libstdc++: Define missing __cpp_lib_int_pow2 macro The P1956R1 renaming isn't implemented on the gcc-9 branch, so this is the old value corresponding to the original proposal that added these functions. * include/std/bit (__cpp_lib_int_pow2): Define to indicate P0556R3 support. * include/std/version (__cpp_lib_int_pow2): Likewise. --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 3dff28d4b744..2c01ae9377a7 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,9 @@ 2020-04-23 Jonathan Wakely + * include/std/bit (__cpp_lib_int_pow2): Define to indicate P0556R3 + support. + * include/std/version (__cpp_lib_int_pow2): Likewise. + Backport from mainline 2019-12-10 Jonathan Wakely diff --git a/libstdc++-v3/include/std/bit b/libstdc++-v3/include/std/bit index 7d5e575722c4..c4af1cfcb4da 100644 --- a/libstdc++-v3/include/std/bit +++ b/libstdc++-v3/include/std/bit @@ -307,6 +307,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION // [bit.pow.two], integral powers of 2 +#define __cpp_lib_int_pow2 201806L + template constexpr _If_is_unsigned_integer<_Tp, bool> ispow2(_Tp __x) noexcept diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 3be53fd9ac57..830b8172e56b 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -169,6 +169,7 @@ # define __cpp_lib_destroying_delete 201806L #endif #define __cpp_lib_endian 201907L +#define __cpp_lib_int_pow2 201806L #ifdef _GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED # define __cpp_lib_is_constant_evaluated 201811L #endif