This is the mail archive of the mailing list for the libstdc++ project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix missing or incorrect feature test macros

On 15/01/19 12:59 +0000, Jonathan Wakely wrote:
On 15/01/19 12:01 +0000, Jonathan Wakely wrote:
	* doc/xml/manual/status_cxx2017.xml: Document P0032R3 and P0307R2
	* include/bits/stl_uninitialized.h (__cpp_lib_raw_memory_algorithms):
	* include/std/any (__cpp_lib_any): Define as 201606L, because P0032R3
	changes are supported.
	* include/std/optional (__cpp_lib_optional): Likewise.
	* include/std/variant (__cpp_lib_variant): Likewise.
	* include/std/version [!__STRICT_ANSI__]
	(__cpp_lib_uncaught_exceptions): Define as long integer.
	[__cplusplus >= 201703L] (__cpp_lib_any)
	(__cpp_lib_raw_memory_algorithms, __cpp_lib_uncaught_exceptions)
	(__cpp_lib_variant): Define for C++17.
	[__cplusplus >= 201703L] (__cpp_lib_optional): Update value and define
	as long integer.
	* libsupc++/exception (__cpp_lib_uncaught_exceptions): Define as long

Some more found by Jakub. Everything in <version> should be consistent
with the rest of the library headers now, for all -std modes.

And one more, where we defined it consistently, but not to the right

Tested powerpc64le-linux, committed to trunk.

commit 172b1fa26185715e39ee7234c86b58e895ecc4b6
Author: Jonathan Wakely <>
Date:   Tue Jan 15 13:03:06 2019 +0000

    Update value of __cpp_lib_shared_ptr_arrays macro
            * include/bits/shared_ptr_base.h (__cpp_lib_shared_ptr_arrays): Define
            as 201611L, because P0497R0 changes are supported.
            * include/std/version (__cpp_lib_shared_ptr_arrays): Likewise.

diff --git a/libstdc++-v3/include/bits/shared_ptr_base.h b/libstdc++-v3/include/bits/shared_ptr_base.h
index cacc7d689ea..b45cbf73667 100644
--- a/libstdc++-v3/include/bits/shared_ptr_base.h
+++ b/libstdc++-v3/include/bits/shared_ptr_base.h
 	  _M_pi = nullptr;
-#define __cpp_lib_shared_ptr_arrays 201603
+#define __cpp_lib_shared_ptr_arrays 201611L
   // Helper traits for shared_ptr of array:
diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version
index 36d291dcf93..38277b9ecf2 100644
--- a/libstdc++-v3/include/std/version
+++ b/libstdc++-v3/include/std/version
@@ -52,7 +52,7 @@
 #define __cpp_lib_allocator_traits_is_always_equal 201411
 #define __cpp_lib_is_null_pointer 201309
 #define __cpp_lib_result_of_sfinae 201210
-#define __cpp_lib_shared_ptr_arrays 201603
+#define __cpp_lib_shared_ptr_arrays 201611L
 #if !defined(__STRICT_ANSI__)
 // gnu++11

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]