libstdc++: Ensure all feature test macros have type long [PR87193]

This defines all the __cpp_lib_xxx macros as type long, as required by
the standard. We had an inconsistent mix of int and long, sometimes even
for the same macro name.

The __cpp_lib_experimental_xxx macros are left as type int, because
that's what it says in the relevant TS specs.

libstdc++-v3/ChangeLog:

	PR libstdc++/87193
	PR libstdc++/104019
	* include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
	Define as type long.
	* include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
	Likewise.
	* include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
	* include/bits/chrono.h (__cpp_lib_chrono): Likewise.
	(__cpp_lib_chrono_udls): Likewise.
	* include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
	* include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
	* include/bits/range_access.h (__cpp_lib_nonmember_container_access):
	Likewise.
	* include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
	Likewise.
	* include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
	(__cpp_lib_sample): Likewise.
	* include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
	Likewise.
	* include/bits/stl_function.h (__cpp_lib_transparent_operators):
	Likewise.
	* include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
	Likewise.
	* include/bits/stl_map.h (__cpp_lib_map_try_emplace):
	Likewise.
	* include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
	Likewise.
	* include/bits/unique_ptr.h (__cpp_lib_make_unique):
	Likewise.
	* include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
	Likewise.
	* include/c_global/cmath (__cpp_lib_hypot): Likewise.
	* include/c_global/cstddef (__cpp_lib_byte): Likewise.
	* include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
	Likewise.
	* include/std/complex (__cpp_lib_complex_udls): Likewise.
	* include/std/filesystem (__cpp_lib_filesystem): Likewise.
	* include/std/functional (__cpp_lib_not_fn): Likewise.
	(__cpp_lib_boyer_moore_searcher): Likewise.
	* include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
	* include/std/mutex (__cpp_lib_scoped_lock): Likewise.
	* include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
	(__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
	* include/std/tuple (__cpp_lib_apply): Likewise.
	(__cpp_lib_make_from_tuple): Likewise.
	* include/std/type_traits (__cpp_lib_integral_constant_callable)
	(__cpp_lib_bool_constant, __cpp_lib_logical_traits)
	(__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
	(__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
	(__cpp_lib_is_swappable, __cpp_lib_is_invocable)
	(__cpp_lib_has_unique_object_representations)
	(__cpp_lib_is_aggregate): Likewise.
	* include/std/version: Likewise.
	* libsupc++/new (__cpp_lib_launder): Likewise.
This commit is contained in:
Jonathan Wakely 2022-01-21 14:22:23 +00:00
parent 2da1ef06ff
commit b8806796ec
29 changed files with 94 additions and 94 deletions

View File

@ -43,7 +43,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201103L
#define __cpp_lib_allocator_traits_is_always_equal 201411
#define __cpp_lib_allocator_traits_is_always_equal 201411L
/// @cond undocumented
struct __allocator_traits_base

View File

@ -49,7 +49,7 @@
#include <type_traits>
#endif
#define __cpp_lib_incomplete_container_elements 201505
#define __cpp_lib_incomplete_container_elements 201505L
namespace std _GLIBCXX_VISIBILITY(default)
{

View File

@ -4309,7 +4309,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201402L
#define __cpp_lib_string_udls 201304
#define __cpp_lib_string_udls 201304L
inline namespace literals
{

View File

@ -327,7 +327,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // C++20
#if __cplusplus >= 201703L
# define __cpp_lib_chrono 201611
# define __cpp_lib_chrono 201611L
template<typename _ToDur, typename _Rep, typename _Period>
constexpr __enable_if_is_duration<_ToDur>
@ -1198,7 +1198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} // namespace chrono
#if __cplusplus >= 201402L
#define __cpp_lib_chrono_udls 201304
#define __cpp_lib_chrono_udls 201304L
inline namespace literals
{

View File

@ -130,7 +130,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 201402L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// 2296. std::addressof should be constexpr
# define __cpp_lib_addressof_constexpr 201603
# define __cpp_lib_addressof_constexpr 201603L
#endif
/**
* @brief Returns the actual address of the object or function

View File

@ -34,7 +34,7 @@
#pragma GCC system_header
#if __cplusplus >= 201703L
# define __cpp_lib_node_extract 201606
# define __cpp_lib_node_extract 201606L
#include <new>
#include <bits/alloc_traits.h>

View File

@ -252,7 +252,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // C++14
#if __cplusplus >= 201703L
#define __cpp_lib_nonmember_container_access 201411
#define __cpp_lib_nonmember_container_access 201411L
/**
* @brief Return the size of a container.

View File

@ -939,7 +939,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return shared_ptr<const _Tp>(this->_M_weak_this); }
#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
#define __cpp_lib_enable_shared_from_this 201603
#define __cpp_lib_enable_shared_from_this 201603L
/** @{
* Get a `weak_ptr` referring to the object that has `*this` as its base.
* @since C++17

View File

@ -3603,7 +3603,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201703L
#define __cpp_lib_clamp 201603
#define __cpp_lib_clamp 201603L
/**
* @brief Returns the value clamped between lo and hi.
@ -5858,7 +5858,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
}
#if __cplusplus > 201402L
#define __cpp_lib_sample 201603
#define __cpp_lib_sample 201603L
/// Take a random sample from a population.
template<typename _PopulationIterator, typename _SampleIterator,
typename _Distance, typename _UniformRandomBitGenerator>

View File

@ -1645,7 +1645,7 @@ _GLIBCXX_BEGIN_NAMESPACE_ALGO
#if __cplusplus > 201103L
#define __cpp_lib_robust_nonmodifying_seq_ops 201304
#define __cpp_lib_robust_nonmodifying_seq_ops 201304L
/**
* @brief Tests a range for element-wise equality.

View File

@ -243,7 +243,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 201103L
#define __cpp_lib_transparent_operators 201510
#define __cpp_lib_transparent_operators 201510L
template<>
struct plus<void>

View File

@ -639,7 +639,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ return reverse_iterator<_Iterator>(__i); }
# if __cplusplus >= 201402L
# define __cpp_lib_make_reverse_iterator 201402
# define __cpp_lib_make_reverse_iterator 201402L
// _GLIBCXX_RESOLVE_LIB_DEFECTS
// DR 2285. make_reverse_iterator

View File

@ -695,7 +695,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
#endif // C++17
#if __cplusplus > 201402L
#define __cpp_lib_map_try_emplace 201411
#define __cpp_lib_map_try_emplace 201411L
/**
* @brief Attempts to build and insert a std::pair into the %map.
*

View File

@ -77,7 +77,7 @@ namespace std _GLIBCXX_VISIBILITY(default)
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 201103L
# define __cpp_lib_generic_associative_lookup 201304
# define __cpp_lib_generic_associative_lookup 201304L
#endif
// Red-black tree class, designed for use in implementing STL

View File

@ -945,7 +945,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
{ };
#if __cplusplus >= 201402L
#define __cpp_lib_make_unique 201304
#define __cpp_lib_make_unique 201304L
/// @cond undocumented
namespace __detail

View File

@ -443,7 +443,7 @@ _GLIBCXX_BEGIN_NAMESPACE_CONTAINER
insert(const_iterator, node_type&& __nh)
{ return _M_h._M_reinsert_node(std::move(__nh)).position; }
#define __cpp_lib_unordered_map_try_emplace 201411
#define __cpp_lib_unordered_map_try_emplace 201411L
/**
* @brief Attempts to build and insert a std::pair into the
* %unordered_map.

View File

@ -1847,7 +1847,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201703L
// [c.math.hypot3], three-dimensional hypotenuse
#define __cpp_lib_hypot 201603
#define __cpp_lib_hypot 201603L
template<typename _Tp>
inline _Tp

View File

@ -63,7 +63,7 @@ namespace std
namespace std
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
#define __cpp_lib_byte 201603
#define __cpp_lib_byte 201603L
/// std::byte
enum class byte : unsigned char {};

View File

@ -50,7 +50,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
*/
#if __cplusplus >= 201703L
# define __cpp_lib_atomic_is_always_lock_free 201603
# define __cpp_lib_atomic_is_always_lock_free 201603L
#endif
template<typename _Tp>

View File

@ -1955,7 +1955,7 @@ inline namespace literals {
inline namespace complex_literals {
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wliteral-suffix"
#define __cpp_lib_complex_udls 201309
#define __cpp_lib_complex_udls 201309L
constexpr std::complex<float>
operator""if(long double __num)

View File

@ -46,7 +46,7 @@
#include <bits/fs_dir.h>
#include <bits/fs_ops.h>
#define __cpp_lib_filesystem 201703
#define __cpp_lib_filesystem 201703L
#endif // C++17

View File

@ -1062,7 +1062,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
: true_type { };
// [func.not_fn] Function template not_fn
#define __cpp_lib_not_fn 201603
#define __cpp_lib_not_fn 201603L
/** Wrap a function object to create one that negates its result.
*
* The function template `std::not_fn` creates a "forwarding call wrapper",
@ -1085,7 +1085,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
// Searchers
#define __cpp_lib_boyer_moore_searcher 201603
#define __cpp_lib_boyer_moore_searcher 201603L
template<typename _ForwardIterator1, typename _BinaryPredicate = equal_to<>>
class default_searcher

View File

@ -448,7 +448,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus >= 201402L
#define __cpp_lib_quoted_string_io 201304
#define __cpp_lib_quoted_string_io 201304L
/**
* @brief Manipulator for quoted strings.

View File

@ -682,7 +682,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
}
#if __cplusplus >= 201703L
#define __cpp_lib_scoped_lock 201703
#define __cpp_lib_scoped_lock 201703L
/** @brief A scoped lock type for multiple lockable objects.
*
* A scoped_lock controls mutex ownership within a scope, releasing

View File

@ -156,10 +156,10 @@ namespace __detail
#if __cplusplus >= 201703L
#define __cpp_lib_gcd_lcm 201606
#define __cpp_lib_gcd_lcm 201606L
// These were used in drafts of SD-6:
#define __cpp_lib_gcd 201606
#define __cpp_lib_lcm 201606
#define __cpp_lib_gcd 201606L
#define __cpp_lib_lcm 201606L
/// Greatest common divisor
template<typename _Mn, typename _Nn>

View File

@ -1843,7 +1843,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline constexpr bool __unpack_std_tuple<_Trait, _Tp, const tuple<_Up...>&>
= _Trait<_Tp, const _Up&...>::value;
# define __cpp_lib_apply 201603
# define __cpp_lib_apply 201603L
template <typename _Fn, typename _Tuple, size_t... _Idx>
constexpr decltype(auto)
@ -1865,7 +1865,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Indices{});
}
#define __cpp_lib_make_from_tuple 201606
#define __cpp_lib_make_from_tuple 201606L
template <typename _Tp, typename _Tuple, size_t... _Idx>
constexpr _Tp

View File

@ -67,7 +67,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
constexpr operator value_type() const noexcept { return value; }
#if __cplusplus > 201103L
#define __cpp_lib_integral_constant_callable 201304
#define __cpp_lib_integral_constant_callable 201304L
constexpr value_type operator()() const noexcept { return value; }
#endif
@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// @endcond
#if __cplusplus >= 201703L
# define __cpp_lib_bool_constant 201505
# define __cpp_lib_bool_constant 201505L
/// Alias template for compile-time boolean constant types.
/// @since C++17
template<bool __v>
@ -188,7 +188,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
inline constexpr bool __and_v = __and_<_Bn...>::value;
/// @endcond
#define __cpp_lib_logical_traits 201510
#define __cpp_lib_logical_traits 201510L
template<typename... _Bn>
struct conjunction
@ -548,7 +548,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
struct is_function<_Tp&&>
: public false_type { };
#define __cpp_lib_is_null_pointer 201309
#define __cpp_lib_is_null_pointer 201309L
template<typename>
struct __is_null_pointer_helper
@ -1594,7 +1594,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#if __cplusplus > 201103L
#define __cpp_lib_transformation_trait_aliases 201304
#define __cpp_lib_transformation_trait_aliases 201304L
/// Alias template for remove_const
template<typename _Tp>
@ -2403,7 +2403,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
// Sfinae-friendly result_of implementation:
#define __cpp_lib_result_of_sfinae 201210
#define __cpp_lib_result_of_sfinae 201210L
/// @cond undocumented
struct __invoke_memfun_ref { };
@ -2631,7 +2631,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
#endif // C++14
#if __cplusplus >= 201703L || !defined(__STRICT_ANSI__) // c++17 or gnu++11
#define __cpp_lib_void_t 201411
#define __cpp_lib_void_t 201411L
/// A metafunction that always yields void, used for detecting valid types.
template<typename...> using void_t = void;
#endif
@ -2768,7 +2768,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// @endcond
#if __cplusplus > 201402L || !defined(__STRICT_ANSI__) // c++1z or gnu++11
#define __cpp_lib_is_swappable 201603
#define __cpp_lib_is_swappable 201603L
/// Metafunctions used for detecting swappable types: p0185r1
/// is_swappable
@ -3015,7 +3015,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
/// @endcond
#if __cplusplus >= 201703L
# define __cpp_lib_is_invocable 201703
# define __cpp_lib_is_invocable 201703L
/// std::invoke_result
template<typename _Functor, typename... _ArgTypes>
@ -3296,7 +3296,7 @@ template<typename _Ret, typename _Fn, typename... _Args>
/// @}
#ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
# define __cpp_lib_has_unique_object_representations 201606
# define __cpp_lib_has_unique_object_representations 201606L
/// has_unique_object_representations
/// @since C++17
template<typename _Tp>
@ -3316,7 +3316,7 @@ template<typename _Ret, typename _Fn, typename... _Args>
#endif
#ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
# define __cpp_lib_is_aggregate 201703
# define __cpp_lib_is_aggregate 201703L
/// is_aggregate
/// @since C++17
template<typename _Tp>

View File

@ -36,7 +36,7 @@
// c++03
#if _GLIBCXX_HOSTED
# define __cpp_lib_incomplete_container_elements 201505
# define __cpp_lib_incomplete_container_elements 201505L
#endif
#if !defined(__STRICT_ANSI__)
@ -46,11 +46,11 @@
#if __cplusplus >= 201103L
// c++11
#define __cpp_lib_is_null_pointer 201309
#define __cpp_lib_result_of_sfinae 201210
#define __cpp_lib_is_null_pointer 201309L
#define __cpp_lib_result_of_sfinae 201210L
#if _GLIBCXX_HOSTED
# define __cpp_lib_allocator_traits_is_always_equal 201411
# define __cpp_lib_allocator_traits_is_always_equal 201411L
#if __cplusplus <= 201703L // N.B. updated value in C++20
# define __cpp_lib_shared_ptr_arrays 201611L
#endif
@ -58,10 +58,10 @@
#if !defined(__STRICT_ANSI__)
// gnu++11
# define __cpp_lib_is_swappable 201603
# define __cpp_lib_void_t 201411
# define __cpp_lib_is_swappable 201603L
# define __cpp_lib_void_t 201411L
# if _GLIBCXX_HOSTED
# define __cpp_lib_enable_shared_from_this 201603
# define __cpp_lib_enable_shared_from_this 201603L
# endif
#endif
@ -73,100 +73,100 @@
#if __cpp_impl_coroutine
# define __cpp_lib_coroutine 201902L
#endif
#define __cpp_lib_integral_constant_callable 201304
#define __cpp_lib_integral_constant_callable 201304L
#define __cpp_lib_is_final 201402L
#define __cpp_lib_transformation_trait_aliases 201304
#define __cpp_lib_transformation_trait_aliases 201304L
#if _GLIBCXX_HOSTED
# define __cpp_lib_chrono_udls 201304
# define __cpp_lib_complex_udls 201309
# define __cpp_lib_exchange_function 201304
# define __cpp_lib_generic_associative_lookup 201304
# define __cpp_lib_integer_sequence 201304
# define __cpp_lib_make_reverse_iterator 201402
# define __cpp_lib_make_unique 201304
# define __cpp_lib_chrono_udls 201304L
# define __cpp_lib_complex_udls 201309L
# define __cpp_lib_exchange_function 201304L
# define __cpp_lib_generic_associative_lookup 201304L
# define __cpp_lib_integer_sequence 201304L
# define __cpp_lib_make_reverse_iterator 201402L
# define __cpp_lib_make_unique 201304L
# ifndef _GLIBCXX_DEBUG // PR libstdc++/70303
# define __cpp_lib_null_iterators 201304L
# endif
# define __cpp_lib_quoted_string_io 201304
# define __cpp_lib_robust_nonmodifying_seq_ops 201304
# define __cpp_lib_quoted_string_io 201304L
# define __cpp_lib_robust_nonmodifying_seq_ops 201304L
# ifdef _GLIBCXX_HAS_GTHREADS
# define __cpp_lib_shared_timed_mutex 201402L
# endif
# define __cpp_lib_string_udls 201304
# define __cpp_lib_transparent_operators 201510
# define __cpp_lib_string_udls 201304L
# define __cpp_lib_transparent_operators 201510L
# define __cpp_lib_tuple_element_t 201402L
# define __cpp_lib_tuples_by_type 201304L
#endif
#if __cplusplus >= 201703L
// c++17
#define __cpp_lib_addressof_constexpr 201603
#define __cpp_lib_atomic_is_always_lock_free 201603
#define __cpp_lib_bool_constant 201505
#define __cpp_lib_byte 201603
#define __cpp_lib_addressof_constexpr 201603L
#define __cpp_lib_atomic_is_always_lock_free 201603L
#define __cpp_lib_bool_constant 201505L
#define __cpp_lib_byte 201603L
#ifdef _GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP
# define __cpp_lib_has_unique_object_representations 201606
# define __cpp_lib_has_unique_object_representations 201606L
#endif
#ifdef _GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE
# define __cpp_lib_is_aggregate 201703
# define __cpp_lib_is_aggregate 201703L
#endif
#define __cpp_lib_is_invocable 201703
#define __cpp_lib_is_swappable 201603
#define __cpp_lib_is_invocable 201703L
#define __cpp_lib_is_swappable 201603L
#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
# define __cpp_lib_launder 201606
# define __cpp_lib_launder 201606L
#endif
#define __cpp_lib_logical_traits 201510
#define __cpp_lib_logical_traits 201510L
#define __cpp_lib_type_trait_variable_templates 201510L
#define __cpp_lib_uncaught_exceptions 201411L
#define __cpp_lib_void_t 201411
#define __cpp_lib_void_t 201411L
#if _GLIBCXX_HOSTED
#define __cpp_lib_any 201606L
#define __cpp_lib_apply 201603
#define __cpp_lib_apply 201603L
#if __cplusplus == 201703L // N.B. updated value in C++20
# define __cpp_lib_array_constexpr 201803L
#endif
#define __cpp_lib_as_const 201510
#define __cpp_lib_boyer_moore_searcher 201603
#define __cpp_lib_chrono 201611
#define __cpp_lib_clamp 201603
#define __cpp_lib_as_const 201510L
#define __cpp_lib_boyer_moore_searcher 201603L
#define __cpp_lib_chrono 201611L
#define __cpp_lib_clamp 201603L
#if __cplusplus == 201703L // N.B. updated value in C++20
# if _GLIBCXX_HAVE_IS_CONSTANT_EVALUATED
# define __cpp_lib_constexpr_char_traits 201611L
# define __cpp_lib_constexpr_string 201611L
# endif
#endif
#define __cpp_lib_enable_shared_from_this 201603
#define __cpp_lib_enable_shared_from_this 201603L
#define __cpp_lib_execution 201902L // FIXME: should be 201603L
#define __cpp_lib_filesystem 201703
#define __cpp_lib_gcd 201606
#define __cpp_lib_gcd_lcm 201606
#define __cpp_lib_filesystem 201703L
#define __cpp_lib_gcd 201606L
#define __cpp_lib_gcd_lcm 201606L
#ifdef __GCC_DESTRUCTIVE_SIZE
# define __cpp_lib_hardware_interference_size 201703L
#endif
#define __cpp_lib_hypot 201603
#define __cpp_lib_hypot 201603L
#define __cpp_lib_invoke 201411L
#define __cpp_lib_lcm 201606
#define __cpp_lib_make_from_tuple 201606
#define __cpp_lib_map_try_emplace 201411
#define __cpp_lib_lcm 201606L
#define __cpp_lib_make_from_tuple 201606L
#define __cpp_lib_map_try_emplace 201411L
#define __cpp_lib_math_special_functions 201603L
#ifdef _GLIBCXX_HAS_GTHREADS
# define __cpp_lib_memory_resource 201603L
#else
# define __cpp_lib_memory_resource 1
#endif
#define __cpp_lib_node_extract 201606
#define __cpp_lib_nonmember_container_access 201411
#define __cpp_lib_not_fn 201603
#define __cpp_lib_node_extract 201606L
#define __cpp_lib_nonmember_container_access 201411L
#define __cpp_lib_not_fn 201603L
#if __cplusplus == 201703L // N.B. updated value in C++20
# define __cpp_lib_optional 201606L
#endif
#define __cpp_lib_parallel_algorithm 201603L
#define __cpp_lib_raw_memory_algorithms 201606L
#define __cpp_lib_sample 201603
#define __cpp_lib_sample 201603L
#ifdef _GLIBCXX_HAS_GTHREADS
# define __cpp_lib_scoped_lock 201703
# define __cpp_lib_scoped_lock 201703L
# define __cpp_lib_shared_mutex 201505L
#endif
#define __cpp_lib_shared_ptr_weak_type 201606L
@ -174,7 +174,7 @@
#if _GLIBCXX_HAVE_USELOCALE
# define __cpp_lib_to_chars 201611L
#endif
#define __cpp_lib_unordered_map_try_emplace 201411
#define __cpp_lib_unordered_map_try_emplace 201411L
#ifndef _GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS
// N.B. updated value in C++20
# define __cpp_lib_variant 202102L

View File

@ -186,7 +186,7 @@ inline void operator delete[](void*, void*) _GLIBCXX_USE_NOEXCEPT { }
namespace std
{
#ifdef _GLIBCXX_HAVE_BUILTIN_LAUNDER
#define __cpp_lib_launder 201606
#define __cpp_lib_launder 201606L
/// Pointer optimization barrier [ptr.launder]
template<typename _Tp>
[[nodiscard]] constexpr _Tp*