[gcc(refs/vendors/ARM/heads/arm-9-branch)] libstdc++: Define missing __cpp_lib_int_pow2 macro

Vidya Praveen vp@gcc.gnu.org
Mon May 11 18:53:06 GMT 2020


https://gcc.gnu.org/g:e29964838b08dd7c0113582620b61505d2ee6c68

commit e29964838b08dd7c0113582620b61505d2ee6c68
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Thu Apr 23 17:20:47 2020 +0100

    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:
---
 libstdc++-v3/ChangeLog           | 4 ++++
 libstdc++-v3/include/std/bit     | 2 ++
 libstdc++-v3/include/std/version | 1 +
 3 files changed, 7 insertions(+)

diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 3dff28d4b74..2c01ae9377a 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,5 +1,9 @@
 2020-04-23  Jonathan Wakely  <jwakely@redhat.com>
 
+	* 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  <jwakely@redhat.com>
 
diff --git a/libstdc++-v3/include/std/bit b/libstdc++-v3/include/std/bit
index 7d5e575722c..c4af1cfcb4d 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<typename _Tp>
     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 3be53fd9ac5..830b8172e56 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


More information about the Libstdc++-cvs mailing list