diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2022-01-21 14:22:23 +0000 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2022-01-21 16:07:34 +0000 |
commit | b8806796ec64585de39ca6ee3b7b30cc08f27d62 (patch) | |
tree | 03426541158133438b4ce614c10a3409f3a30145 /libstdc++-v3/include/std/version | |
parent | 2da1ef06ff4bee961f51321dee9d0866c7ebb1cc (diff) | |
download | gcc-b8806796ec64585de39ca6ee3b7b30cc08f27d62.zip gcc-b8806796ec64585de39ca6ee3b7b30cc08f27d62.tar.gz gcc-b8806796ec64585de39ca6ee3b7b30cc08f27d62.tar.bz2 |
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.
Diffstat (limited to 'libstdc++-v3/include/std/version')
-rw-r--r-- | libstdc++-v3/include/std/version | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/libstdc++-v3/include/std/version b/libstdc++-v3/include/std/version index 64759c9..30e04b5 100644 --- a/libstdc++-v3/include/std/version +++ b/libstdc++-v3/include/std/version @@ -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 |