From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2181) id 460633858C60; Fri, 15 Sep 2023 09:24:41 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 460633858C60 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1694769881; bh=8HzyeAeK3U2JSg8Y6bPRmiPUP+j0CnfsgWYYuSlbyNU=; h=From:To:Subject:Date:From; b=chhP0m4Hlln31CRtRZjYtyUeqRHTzchK2UInfBjWZ5+POg4oDkO4z0NjXI0wsFdOu 3lvw5KOVUd2doF6JpukdVkwVK3dTaW+yfQJzL4u0WaEhoD7j+6H1gd8nh64LQXwx4r 529fHsmRc0KK4KI+pyBDjgJ0GLoyeJoJYgOyfEx4= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Jonathan Wakely To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org Subject: [gcc r14-4011] libstdc++: Add operator bool to result types (P2497R0) X-Act-Checkin: gcc X-Git-Author: Jonathan Wakely X-Git-Refname: refs/heads/master X-Git-Oldrev: 2d38f45bcca62ca0c7afef4b579f82c5c2a01610 X-Git-Newrev: 8fa1430bb28c775bb8b97c4337b0cd61db9f4d2e Message-Id: <20230915092441.460633858C60@sourceware.org> Date: Fri, 15 Sep 2023 09:24:41 +0000 (GMT) List-Id: https://gcc.gnu.org/g:8fa1430bb28c775bb8b97c4337b0cd61db9f4d2e commit r14-4011-g8fa1430bb28c775bb8b97c4337b0cd61db9f4d2e Author: Jonathan Wakely Date: Fri Aug 18 00:24:46 2023 +0100 libstdc++: Add operator bool to result types (P2497R0) C++26 adds these convenience conversions. libstdc++-v3/ChangeLog: * include/bits/version.def (to_chars): Define new value for C++26. * include/bits/version.h: Regenerate. * include/std/charconv (to_chars_result::operator bool): New function. (from_chars_result::operator bool): New function. * testsuite/20_util/to_chars/version.cc: Update expected value. * testsuite/20_util/from_chars/result.cc: New test. * testsuite/20_util/to_chars/result.cc: New test. Diff: --- libstdc++-v3/include/bits/version.def | 7 + libstdc++-v3/include/bits/version.h | 299 +++++++++++---------- libstdc++-v3/include/std/charconv | 6 + .../testsuite/20_util/from_chars/result.cc | 21 ++ libstdc++-v3/testsuite/20_util/to_chars/result.cc | 25 ++ libstdc++-v3/testsuite/20_util/to_chars/version.cc | 2 +- 6 files changed, 212 insertions(+), 148 deletions(-) diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def index 8d9b2f71a2e..b7d17c91c34 100644 --- a/libstdc++-v3/include/bits/version.def +++ b/libstdc++-v3/include/bits/version.def @@ -255,6 +255,13 @@ ftms = { ftms = { name = to_chars; + values = { + v = 202306; + cxxmin = 26; + extra_cond = "_GLIBCXX_FLOAT_IS_IEEE_BINARY32 " + "&& _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 " + "&& __SIZE_WIDTH__ >= 32"; + }; values = { v = 201611; cxxmin = 14; diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h index 3c20a8a51fb..82adda221c2 100644 --- a/libstdc++-v3/include/bits/version.h +++ b/libstdc++-v3/include/bits/version.h @@ -297,7 +297,12 @@ // from version.def line 257 #if !defined(__cpp_lib_to_chars) -# if (__cplusplus >= 201402L) && (_GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 && __SIZE_WIDTH__ >= 32) +# if (__cplusplus > 202302L) && (_GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 && __SIZE_WIDTH__ >= 32) +# define __glibcxx_to_chars 202306L +# if defined(__glibcxx_want_all) || defined(__glibcxx_want_to_chars) +# define __cpp_lib_to_chars 202306L +# endif +# elif (__cplusplus >= 201402L) && (_GLIBCXX_FLOAT_IS_IEEE_BINARY32 && _GLIBCXX_DOUBLE_IS_IEEE_BINARY64 && __SIZE_WIDTH__ >= 32) # define __glibcxx_to_chars 201611L # if defined(__glibcxx_want_all) || defined(__glibcxx_want_to_chars) # define __cpp_lib_to_chars 201611L @@ -306,7 +311,7 @@ #endif /* !defined(__cpp_lib_to_chars) && defined(__glibcxx_want_to_chars) */ #undef __glibcxx_want_to_chars -// from version.def line 268 +// from version.def line 275 #if !defined(__cpp_lib_chrono_udls) # if (__cplusplus >= 201402L) && _GLIBCXX_HOSTED # define __glibcxx_chrono_udls 201304L @@ -317,7 +322,7 @@ #endif /* !defined(__cpp_lib_chrono_udls) && defined(__glibcxx_want_chrono_udls) */ #undef __glibcxx_want_chrono_udls -// from version.def line 277 +// from version.def line 284 #if !defined(__cpp_lib_complex_udls) # if (__cplusplus >= 201402L) && _GLIBCXX_HOSTED # define __glibcxx_complex_udls 201309L @@ -328,7 +333,7 @@ #endif /* !defined(__cpp_lib_complex_udls) && defined(__glibcxx_want_complex_udls) */ #undef __glibcxx_want_complex_udls -// from version.def line 286 +// from version.def line 293 #if !defined(__cpp_lib_generic_associative_lookup) # if (__cplusplus >= 201402L) && _GLIBCXX_HOSTED # define __glibcxx_generic_associative_lookup 201304L @@ -339,7 +344,7 @@ #endif /* !defined(__cpp_lib_generic_associative_lookup) && defined(__glibcxx_want_generic_associative_lookup) */ #undef __glibcxx_want_generic_associative_lookup -// from version.def line 295 +// from version.def line 302 #if !defined(__cpp_lib_make_unique) # if (__cplusplus >= 201402L) && _GLIBCXX_HOSTED # define __glibcxx_make_unique 201304L @@ -350,7 +355,7 @@ #endif /* !defined(__cpp_lib_make_unique) && defined(__glibcxx_want_make_unique) */ #undef __glibcxx_want_make_unique -// from version.def line 304 +// from version.def line 311 #if !defined(__cpp_lib_quoted_string_io) # if (__cplusplus >= 201402L) && _GLIBCXX_HOSTED # define __glibcxx_quoted_string_io 201304L @@ -361,7 +366,7 @@ #endif /* !defined(__cpp_lib_quoted_string_io) && defined(__glibcxx_want_quoted_string_io) */ #undef __glibcxx_want_quoted_string_io -// from version.def line 313 +// from version.def line 320 #if !defined(__cpp_lib_shared_timed_mutex) # if (__cplusplus >= 201402L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED # define __glibcxx_shared_timed_mutex 201402L @@ -372,7 +377,7 @@ #endif /* !defined(__cpp_lib_shared_timed_mutex) && defined(__glibcxx_want_shared_timed_mutex) */ #undef __glibcxx_want_shared_timed_mutex -// from version.def line 323 +// from version.def line 330 #if !defined(__cpp_lib_string_udls) # if (__cplusplus >= 201402L) && _GLIBCXX_HOSTED # define __glibcxx_string_udls 201304L @@ -383,7 +388,7 @@ #endif /* !defined(__cpp_lib_string_udls) && defined(__glibcxx_want_string_udls) */ #undef __glibcxx_want_string_udls -// from version.def line 332 +// from version.def line 339 #if !defined(__cpp_lib_addressof_constexpr) # if (__cplusplus >= 201703L) # define __glibcxx_addressof_constexpr 201603L @@ -394,7 +399,7 @@ #endif /* !defined(__cpp_lib_addressof_constexpr) && defined(__glibcxx_want_addressof_constexpr) */ #undef __glibcxx_want_addressof_constexpr -// from version.def line 342 +// from version.def line 349 #if !defined(__cpp_lib_any) # if (__cplusplus >= 201703L) # define __glibcxx_any 201606L @@ -405,7 +410,7 @@ #endif /* !defined(__cpp_lib_any) && defined(__glibcxx_want_any) */ #undef __glibcxx_want_any -// from version.def line 350 +// from version.def line 357 #if !defined(__cpp_lib_apply) # if (__cplusplus >= 201703L) # define __glibcxx_apply 201603L @@ -416,7 +421,7 @@ #endif /* !defined(__cpp_lib_apply) && defined(__glibcxx_want_apply) */ #undef __glibcxx_want_apply -// from version.def line 358 +// from version.def line 365 #if !defined(__cpp_lib_as_const) # if (__cplusplus >= 201703L) # define __glibcxx_as_const 201510L @@ -427,7 +432,7 @@ #endif /* !defined(__cpp_lib_as_const) && defined(__glibcxx_want_as_const) */ #undef __glibcxx_want_as_const -// from version.def line 366 +// from version.def line 373 #if !defined(__cpp_lib_atomic_is_always_lock_free) # if (__cplusplus >= 201703L) # define __glibcxx_atomic_is_always_lock_free 201603L @@ -438,7 +443,7 @@ #endif /* !defined(__cpp_lib_atomic_is_always_lock_free) && defined(__glibcxx_want_atomic_is_always_lock_free) */ #undef __glibcxx_want_atomic_is_always_lock_free -// from version.def line 374 +// from version.def line 381 #if !defined(__cpp_lib_bool_constant) # if (__cplusplus >= 201703L) # define __glibcxx_bool_constant 201505L @@ -449,7 +454,7 @@ #endif /* !defined(__cpp_lib_bool_constant) && defined(__glibcxx_want_bool_constant) */ #undef __glibcxx_want_bool_constant -// from version.def line 382 +// from version.def line 389 #if !defined(__cpp_lib_byte) # if (__cplusplus >= 201703L) # define __glibcxx_byte 201603L @@ -460,7 +465,7 @@ #endif /* !defined(__cpp_lib_byte) && defined(__glibcxx_want_byte) */ #undef __glibcxx_want_byte -// from version.def line 390 +// from version.def line 397 #if !defined(__cpp_lib_has_unique_object_representations) # if (__cplusplus >= 201703L) && (defined(_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)) # define __glibcxx_has_unique_object_representations 201606L @@ -471,7 +476,7 @@ #endif /* !defined(__cpp_lib_has_unique_object_representations) && defined(__glibcxx_want_has_unique_object_representations) */ #undef __glibcxx_want_has_unique_object_representations -// from version.def line 399 +// from version.def line 406 #if !defined(__cpp_lib_hardware_interference_size) # if (__cplusplus >= 201703L) && (defined(__GCC_DESTRUCTIVE_SIZE)) # define __glibcxx_hardware_interference_size 201703L @@ -482,7 +487,7 @@ #endif /* !defined(__cpp_lib_hardware_interference_size) && defined(__glibcxx_want_hardware_interference_size) */ #undef __glibcxx_want_hardware_interference_size -// from version.def line 408 +// from version.def line 415 #if !defined(__cpp_lib_invoke) # if (__cplusplus >= 201703L) # define __glibcxx_invoke 201411L @@ -493,7 +498,7 @@ #endif /* !defined(__cpp_lib_invoke) && defined(__glibcxx_want_invoke) */ #undef __glibcxx_want_invoke -// from version.def line 416 +// from version.def line 423 #if !defined(__cpp_lib_is_aggregate) # if (__cplusplus >= 201703L) && (defined(_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE)) # define __glibcxx_is_aggregate 201703L @@ -504,7 +509,7 @@ #endif /* !defined(__cpp_lib_is_aggregate) && defined(__glibcxx_want_is_aggregate) */ #undef __glibcxx_want_is_aggregate -// from version.def line 425 +// from version.def line 432 #if !defined(__cpp_lib_is_invocable) # if (__cplusplus >= 201703L) # define __glibcxx_is_invocable 201703L @@ -515,7 +520,7 @@ #endif /* !defined(__cpp_lib_is_invocable) && defined(__glibcxx_want_is_invocable) */ #undef __glibcxx_want_is_invocable -// from version.def line 433 +// from version.def line 440 #if !defined(__cpp_lib_launder) # if (__cplusplus >= 201703L) && (defined(_GLIBCXX_HAVE_BUILTIN_LAUNDER)) # define __glibcxx_launder 201606L @@ -526,7 +531,7 @@ #endif /* !defined(__cpp_lib_launder) && defined(__glibcxx_want_launder) */ #undef __glibcxx_want_launder -// from version.def line 442 +// from version.def line 449 #if !defined(__cpp_lib_logical_traits) # if (__cplusplus >= 201703L) # define __glibcxx_logical_traits 201510L @@ -537,7 +542,7 @@ #endif /* !defined(__cpp_lib_logical_traits) && defined(__glibcxx_want_logical_traits) */ #undef __glibcxx_want_logical_traits -// from version.def line 450 +// from version.def line 457 #if !defined(__cpp_lib_make_from_tuple) # if (__cplusplus >= 201703L) # define __glibcxx_make_from_tuple 201606L @@ -548,7 +553,7 @@ #endif /* !defined(__cpp_lib_make_from_tuple) && defined(__glibcxx_want_make_from_tuple) */ #undef __glibcxx_want_make_from_tuple -// from version.def line 458 +// from version.def line 465 #if !defined(__cpp_lib_not_fn) # if (__cplusplus >= 201703L) # define __glibcxx_not_fn 201603L @@ -559,7 +564,7 @@ #endif /* !defined(__cpp_lib_not_fn) && defined(__glibcxx_want_not_fn) */ #undef __glibcxx_want_not_fn -// from version.def line 466 +// from version.def line 473 #if !defined(__cpp_lib_type_trait_variable_templates) # if (__cplusplus >= 201703L) # define __glibcxx_type_trait_variable_templates 201510L @@ -570,7 +575,7 @@ #endif /* !defined(__cpp_lib_type_trait_variable_templates) && defined(__glibcxx_want_type_trait_variable_templates) */ #undef __glibcxx_want_type_trait_variable_templates -// from version.def line 474 +// from version.def line 481 #if !defined(__cpp_lib_variant) # if (__cplusplus >= 202002L) && (__cpp_concepts >= 202002L && __cpp_constexpr >= 201811L) # define __glibcxx_variant 202106L @@ -586,7 +591,7 @@ #endif /* !defined(__cpp_lib_variant) && defined(__glibcxx_want_variant) */ #undef __glibcxx_want_variant -// from version.def line 488 +// from version.def line 495 #if !defined(__cpp_lib_lcm) # if (__cplusplus >= 201703L) # define __glibcxx_lcm 201606L @@ -597,7 +602,7 @@ #endif /* !defined(__cpp_lib_lcm) && defined(__glibcxx_want_lcm) */ #undef __glibcxx_want_lcm -// from version.def line 497 +// from version.def line 504 #if !defined(__cpp_lib_gcd) # if (__cplusplus >= 201703L) # define __glibcxx_gcd 201606L @@ -608,7 +613,7 @@ #endif /* !defined(__cpp_lib_gcd) && defined(__glibcxx_want_gcd) */ #undef __glibcxx_want_gcd -// from version.def line 505 +// from version.def line 512 #if !defined(__cpp_lib_gcd_lcm) # if (__cplusplus >= 201703L) # define __glibcxx_gcd_lcm 201606L @@ -619,7 +624,7 @@ #endif /* !defined(__cpp_lib_gcd_lcm) && defined(__glibcxx_want_gcd_lcm) */ #undef __glibcxx_want_gcd_lcm -// from version.def line 513 +// from version.def line 520 #if !defined(__cpp_lib_raw_memory_algorithms) # if (__cplusplus >= 201703L) # define __glibcxx_raw_memory_algorithms 201606L @@ -630,7 +635,7 @@ #endif /* !defined(__cpp_lib_raw_memory_algorithms) && defined(__glibcxx_want_raw_memory_algorithms) */ #undef __glibcxx_want_raw_memory_algorithms -// from version.def line 521 +// from version.def line 528 #if !defined(__cpp_lib_array_constexpr) # if (__cplusplus >= 202002L) # define __glibcxx_array_constexpr 201811L @@ -646,7 +651,7 @@ #endif /* !defined(__cpp_lib_array_constexpr) && defined(__glibcxx_want_array_constexpr) */ #undef __glibcxx_want_array_constexpr -// from version.def line 533 +// from version.def line 540 #if !defined(__cpp_lib_nonmember_container_access) # if (__cplusplus >= 201703L) # define __glibcxx_nonmember_container_access 201411L @@ -657,7 +662,7 @@ #endif /* !defined(__cpp_lib_nonmember_container_access) && defined(__glibcxx_want_nonmember_container_access) */ #undef __glibcxx_want_nonmember_container_access -// from version.def line 541 +// from version.def line 548 #if !defined(__cpp_lib_clamp) # if (__cplusplus >= 201703L) # define __glibcxx_clamp 201603L @@ -668,7 +673,7 @@ #endif /* !defined(__cpp_lib_clamp) && defined(__glibcxx_want_clamp) */ #undef __glibcxx_want_clamp -// from version.def line 549 +// from version.def line 556 #if !defined(__cpp_lib_sample) # if (__cplusplus >= 201703L) # define __glibcxx_sample 201603L @@ -679,7 +684,7 @@ #endif /* !defined(__cpp_lib_sample) && defined(__glibcxx_want_sample) */ #undef __glibcxx_want_sample -// from version.def line 557 +// from version.def line 564 #if !defined(__cpp_lib_boyer_moore_searcher) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_boyer_moore_searcher 201603L @@ -690,7 +695,7 @@ #endif /* !defined(__cpp_lib_boyer_moore_searcher) && defined(__glibcxx_want_boyer_moore_searcher) */ #undef __glibcxx_want_boyer_moore_searcher -// from version.def line 566 +// from version.def line 573 #if !defined(__cpp_lib_chrono) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_chrono 201907L @@ -706,7 +711,7 @@ #endif /* !defined(__cpp_lib_chrono) && defined(__glibcxx_want_chrono) */ #undef __glibcxx_want_chrono -// from version.def line 580 +// from version.def line 587 #if !defined(__cpp_lib_execution) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_execution 201902L @@ -717,7 +722,7 @@ #endif /* !defined(__cpp_lib_execution) && defined(__glibcxx_want_execution) */ #undef __glibcxx_want_execution -// from version.def line 589 +// from version.def line 596 #if !defined(__cpp_lib_filesystem) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_filesystem 201703L @@ -728,7 +733,7 @@ #endif /* !defined(__cpp_lib_filesystem) && defined(__glibcxx_want_filesystem) */ #undef __glibcxx_want_filesystem -// from version.def line 598 +// from version.def line 605 #if !defined(__cpp_lib_hypot) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_hypot 201603L @@ -739,7 +744,7 @@ #endif /* !defined(__cpp_lib_hypot) && defined(__glibcxx_want_hypot) */ #undef __glibcxx_want_hypot -// from version.def line 607 +// from version.def line 614 #if !defined(__cpp_lib_map_try_emplace) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_map_try_emplace 201411L @@ -750,7 +755,7 @@ #endif /* !defined(__cpp_lib_map_try_emplace) && defined(__glibcxx_want_map_try_emplace) */ #undef __glibcxx_want_map_try_emplace -// from version.def line 616 +// from version.def line 623 #if !defined(__cpp_lib_math_special_functions) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_math_special_functions 201603L @@ -761,7 +766,7 @@ #endif /* !defined(__cpp_lib_math_special_functions) && defined(__glibcxx_want_math_special_functions) */ #undef __glibcxx_want_math_special_functions -// from version.def line 625 +// from version.def line 632 #if !defined(__cpp_lib_memory_resource) # if (__cplusplus >= 201703L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED # define __glibcxx_memory_resource 201603L @@ -777,7 +782,7 @@ #endif /* !defined(__cpp_lib_memory_resource) && defined(__glibcxx_want_memory_resource) */ #undef __glibcxx_want_memory_resource -// from version.def line 642 +// from version.def line 649 #if !defined(__cpp_lib_node_extract) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_node_extract 201606L @@ -788,7 +793,7 @@ #endif /* !defined(__cpp_lib_node_extract) && defined(__glibcxx_want_node_extract) */ #undef __glibcxx_want_node_extract -// from version.def line 651 +// from version.def line 658 #if !defined(__cpp_lib_parallel_algorithm) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_parallel_algorithm 201603L @@ -799,7 +804,7 @@ #endif /* !defined(__cpp_lib_parallel_algorithm) && defined(__glibcxx_want_parallel_algorithm) */ #undef __glibcxx_want_parallel_algorithm -// from version.def line 660 +// from version.def line 667 #if !defined(__cpp_lib_scoped_lock) # if (__cplusplus >= 201703L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED # define __glibcxx_scoped_lock 201703L @@ -810,7 +815,7 @@ #endif /* !defined(__cpp_lib_scoped_lock) && defined(__glibcxx_want_scoped_lock) */ #undef __glibcxx_want_scoped_lock -// from version.def line 670 +// from version.def line 677 #if !defined(__cpp_lib_shared_mutex) # if (__cplusplus >= 201703L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED # define __glibcxx_shared_mutex 201505L @@ -821,7 +826,7 @@ #endif /* !defined(__cpp_lib_shared_mutex) && defined(__glibcxx_want_shared_mutex) */ #undef __glibcxx_want_shared_mutex -// from version.def line 680 +// from version.def line 687 #if !defined(__cpp_lib_shared_ptr_weak_type) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_shared_ptr_weak_type 201606L @@ -832,7 +837,7 @@ #endif /* !defined(__cpp_lib_shared_ptr_weak_type) && defined(__glibcxx_want_shared_ptr_weak_type) */ #undef __glibcxx_want_shared_ptr_weak_type -// from version.def line 689 +// from version.def line 696 #if !defined(__cpp_lib_string_view) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_string_view 201803L @@ -843,7 +848,7 @@ #endif /* !defined(__cpp_lib_string_view) && defined(__glibcxx_want_string_view) */ #undef __glibcxx_want_string_view -// from version.def line 698 +// from version.def line 705 #if !defined(__cpp_lib_unordered_map_try_emplace) # if (__cplusplus >= 201703L) && _GLIBCXX_HOSTED # define __glibcxx_unordered_map_try_emplace 201411L @@ -854,7 +859,7 @@ #endif /* !defined(__cpp_lib_unordered_map_try_emplace) && defined(__glibcxx_want_unordered_map_try_emplace) */ #undef __glibcxx_want_unordered_map_try_emplace -// from version.def line 707 +// from version.def line 714 #if !defined(__cpp_lib_assume_aligned) # if (__cplusplus >= 202002L) # define __glibcxx_assume_aligned 201811L @@ -865,7 +870,7 @@ #endif /* !defined(__cpp_lib_assume_aligned) && defined(__glibcxx_want_assume_aligned) */ #undef __glibcxx_want_assume_aligned -// from version.def line 715 +// from version.def line 722 #if !defined(__cpp_lib_atomic_flag_test) # if (__cplusplus >= 202002L) # define __glibcxx_atomic_flag_test 201907L @@ -876,7 +881,7 @@ #endif /* !defined(__cpp_lib_atomic_flag_test) && defined(__glibcxx_want_atomic_flag_test) */ #undef __glibcxx_want_atomic_flag_test -// from version.def line 723 +// from version.def line 730 #if !defined(__cpp_lib_atomic_float) # if (__cplusplus >= 202002L) # define __glibcxx_atomic_float 201711L @@ -887,7 +892,7 @@ #endif /* !defined(__cpp_lib_atomic_float) && defined(__glibcxx_want_atomic_float) */ #undef __glibcxx_want_atomic_float -// from version.def line 731 +// from version.def line 738 #if !defined(__cpp_lib_atomic_lock_free_type_aliases) # if (__cplusplus >= 202002L) # define __glibcxx_atomic_lock_free_type_aliases 201907L @@ -898,7 +903,7 @@ #endif /* !defined(__cpp_lib_atomic_lock_free_type_aliases) && defined(__glibcxx_want_atomic_lock_free_type_aliases) */ #undef __glibcxx_want_atomic_lock_free_type_aliases -// from version.def line 739 +// from version.def line 746 #if !defined(__cpp_lib_atomic_ref) # if (__cplusplus >= 202002L) # define __glibcxx_atomic_ref 201806L @@ -909,7 +914,7 @@ #endif /* !defined(__cpp_lib_atomic_ref) && defined(__glibcxx_want_atomic_ref) */ #undef __glibcxx_want_atomic_ref -// from version.def line 747 +// from version.def line 754 #if !defined(__cpp_lib_atomic_value_initialization) # if (__cplusplus >= 202002L) # define __glibcxx_atomic_value_initialization 201911L @@ -920,7 +925,7 @@ #endif /* !defined(__cpp_lib_atomic_value_initialization) && defined(__glibcxx_want_atomic_value_initialization) */ #undef __glibcxx_want_atomic_value_initialization -// from version.def line 755 +// from version.def line 762 #if !defined(__cpp_lib_bind_front) # if (__cplusplus >= 202002L) # define __glibcxx_bind_front 201907L @@ -931,7 +936,7 @@ #endif /* !defined(__cpp_lib_bind_front) && defined(__glibcxx_want_bind_front) */ #undef __glibcxx_want_bind_front -// from version.def line 763 +// from version.def line 770 #if !defined(__cpp_lib_starts_ends_with) # if (__cplusplus >= 202002L) # define __glibcxx_starts_ends_with 201711L @@ -942,7 +947,7 @@ #endif /* !defined(__cpp_lib_starts_ends_with) && defined(__glibcxx_want_starts_ends_with) */ #undef __glibcxx_want_starts_ends_with -// from version.def line 771 +// from version.def line 778 #if !defined(__cpp_lib_bit_cast) # if (__cplusplus >= 202002L) && (__has_builtin(__builtin_bit_cast)) # define __glibcxx_bit_cast 201806L @@ -953,7 +958,7 @@ #endif /* !defined(__cpp_lib_bit_cast) && defined(__glibcxx_want_bit_cast) */ #undef __glibcxx_want_bit_cast -// from version.def line 780 +// from version.def line 787 #if !defined(__cpp_lib_bitops) # if (__cplusplus >= 202002L) # define __glibcxx_bitops 201907L @@ -964,7 +969,7 @@ #endif /* !defined(__cpp_lib_bitops) && defined(__glibcxx_want_bitops) */ #undef __glibcxx_want_bitops -// from version.def line 788 +// from version.def line 795 #if !defined(__cpp_lib_bounded_array_traits) # if (__cplusplus >= 202002L) # define __glibcxx_bounded_array_traits 201902L @@ -975,7 +980,7 @@ #endif /* !defined(__cpp_lib_bounded_array_traits) && defined(__glibcxx_want_bounded_array_traits) */ #undef __glibcxx_want_bounded_array_traits -// from version.def line 796 +// from version.def line 803 #if !defined(__cpp_lib_concepts) # if (__cplusplus >= 202002L) && (__cpp_concepts >= 201907L) # define __glibcxx_concepts 202002L @@ -986,7 +991,7 @@ #endif /* !defined(__cpp_lib_concepts) && defined(__glibcxx_want_concepts) */ #undef __glibcxx_want_concepts -// from version.def line 806 +// from version.def line 813 #if !defined(__cpp_lib_optional) # if (__cplusplus >= 202302L) && (__glibcxx_concepts) # define __glibcxx_optional 202110L @@ -1007,7 +1012,7 @@ #endif /* !defined(__cpp_lib_optional) && defined(__glibcxx_want_optional) */ #undef __glibcxx_want_optional -// from version.def line 823 +// from version.def line 830 #if !defined(__cpp_lib_destroying_delete) # if (__cplusplus >= 202002L) && (__cpp_impl_destroying_delete) # define __glibcxx_destroying_delete 201806L @@ -1018,7 +1023,7 @@ #endif /* !defined(__cpp_lib_destroying_delete) && defined(__glibcxx_want_destroying_delete) */ #undef __glibcxx_want_destroying_delete -// from version.def line 832 +// from version.def line 839 #if !defined(__cpp_lib_constexpr_string_view) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_string_view 201811L @@ -1029,7 +1034,7 @@ #endif /* !defined(__cpp_lib_constexpr_string_view) && defined(__glibcxx_want_constexpr_string_view) */ #undef __glibcxx_want_constexpr_string_view -// from version.def line 840 +// from version.def line 847 #if !defined(__cpp_lib_endian) # if (__cplusplus >= 202002L) # define __glibcxx_endian 201907L @@ -1040,7 +1045,7 @@ #endif /* !defined(__cpp_lib_endian) && defined(__glibcxx_want_endian) */ #undef __glibcxx_want_endian -// from version.def line 848 +// from version.def line 855 #if !defined(__cpp_lib_int_pow2) # if (__cplusplus >= 202002L) # define __glibcxx_int_pow2 202002L @@ -1051,7 +1056,7 @@ #endif /* !defined(__cpp_lib_int_pow2) && defined(__glibcxx_want_int_pow2) */ #undef __glibcxx_want_int_pow2 -// from version.def line 856 +// from version.def line 863 #if !defined(__cpp_lib_integer_comparison_functions) # if (__cplusplus >= 202002L) # define __glibcxx_integer_comparison_functions 202002L @@ -1062,7 +1067,7 @@ #endif /* !defined(__cpp_lib_integer_comparison_functions) && defined(__glibcxx_want_integer_comparison_functions) */ #undef __glibcxx_want_integer_comparison_functions -// from version.def line 864 +// from version.def line 871 #if !defined(__cpp_lib_is_constant_evaluated) # if (__cplusplus >= 202002L) && (defined(_GLIBCXX_HAVE_IS_CONSTANT_EVALUATED)) # define __glibcxx_is_constant_evaluated 201811L @@ -1073,7 +1078,7 @@ #endif /* !defined(__cpp_lib_is_constant_evaluated) && defined(__glibcxx_want_is_constant_evaluated) */ #undef __glibcxx_want_is_constant_evaluated -// from version.def line 874 +// from version.def line 881 #if !defined(__cpp_lib_constexpr_char_traits) # if (__cplusplus >= 202002L) && (defined(__glibcxx_is_constant_evaluated)) # define __glibcxx_constexpr_char_traits 201811L @@ -1089,7 +1094,7 @@ #endif /* !defined(__cpp_lib_constexpr_char_traits) && defined(__glibcxx_want_constexpr_char_traits) */ #undef __glibcxx_want_constexpr_char_traits -// from version.def line 890 +// from version.def line 897 #if !defined(__cpp_lib_is_layout_compatible) # if (__cplusplus >= 202002L) && (__has_builtin(__is_layout_compatible) && __has_builtin(__builtin_is_corresponding_member)) # define __glibcxx_is_layout_compatible 201907L @@ -1100,7 +1105,7 @@ #endif /* !defined(__cpp_lib_is_layout_compatible) && defined(__glibcxx_want_is_layout_compatible) */ #undef __glibcxx_want_is_layout_compatible -// from version.def line 900 +// from version.def line 907 #if !defined(__cpp_lib_is_nothrow_convertible) # if (__cplusplus >= 202002L) # define __glibcxx_is_nothrow_convertible 201806L @@ -1111,7 +1116,7 @@ #endif /* !defined(__cpp_lib_is_nothrow_convertible) && defined(__glibcxx_want_is_nothrow_convertible) */ #undef __glibcxx_want_is_nothrow_convertible -// from version.def line 908 +// from version.def line 915 #if !defined(__cpp_lib_is_pointer_interconvertible) # if (__cplusplus >= 202002L) && (__has_builtin(__is_pointer_interconvertible_base_of) && __has_builtin(__builtin_is_pointer_interconvertible_with_class)) # define __glibcxx_is_pointer_interconvertible 201907L @@ -1122,7 +1127,7 @@ #endif /* !defined(__cpp_lib_is_pointer_interconvertible) && defined(__glibcxx_want_is_pointer_interconvertible) */ #undef __glibcxx_want_is_pointer_interconvertible -// from version.def line 919 +// from version.def line 926 #if !defined(__cpp_lib_math_constants) # if (__cplusplus >= 202002L) # define __glibcxx_math_constants 201907L @@ -1133,7 +1138,7 @@ #endif /* !defined(__cpp_lib_math_constants) && defined(__glibcxx_want_math_constants) */ #undef __glibcxx_want_math_constants -// from version.def line 927 +// from version.def line 934 #if !defined(__cpp_lib_make_obj_using_allocator) # if (__cplusplus >= 202002L) && (__cpp_concepts) # define __glibcxx_make_obj_using_allocator 201811L @@ -1144,7 +1149,7 @@ #endif /* !defined(__cpp_lib_make_obj_using_allocator) && defined(__glibcxx_want_make_obj_using_allocator) */ #undef __glibcxx_want_make_obj_using_allocator -// from version.def line 937 +// from version.def line 944 #if !defined(__cpp_lib_remove_cvref) # if (__cplusplus >= 202002L) # define __glibcxx_remove_cvref 201711L @@ -1155,7 +1160,7 @@ #endif /* !defined(__cpp_lib_remove_cvref) && defined(__glibcxx_want_remove_cvref) */ #undef __glibcxx_want_remove_cvref -// from version.def line 945 +// from version.def line 952 #if !defined(__cpp_lib_source_location) # if (__cplusplus >= 202002L) && (__has_builtin(__builtin_source_location)) # define __glibcxx_source_location 201907L @@ -1166,7 +1171,7 @@ #endif /* !defined(__cpp_lib_source_location) && defined(__glibcxx_want_source_location) */ #undef __glibcxx_want_source_location -// from version.def line 954 +// from version.def line 961 #if !defined(__cpp_lib_span) # if (__cplusplus >= 202002L) && (__glibcxx_concepts) # define __glibcxx_span 202002L @@ -1177,7 +1182,7 @@ #endif /* !defined(__cpp_lib_span) && defined(__glibcxx_want_span) */ #undef __glibcxx_want_span -// from version.def line 963 +// from version.def line 970 #if !defined(__cpp_lib_ssize) # if (__cplusplus >= 202002L) # define __glibcxx_ssize 201902L @@ -1188,7 +1193,7 @@ #endif /* !defined(__cpp_lib_ssize) && defined(__glibcxx_want_ssize) */ #undef __glibcxx_want_ssize -// from version.def line 971 +// from version.def line 978 #if !defined(__cpp_lib_three_way_comparison) # if (__cplusplus >= 202002L) && (__cpp_impl_three_way_comparison >= 201907L && __glibcxx_concepts) # define __glibcxx_three_way_comparison 201907L @@ -1199,7 +1204,7 @@ #endif /* !defined(__cpp_lib_three_way_comparison) && defined(__glibcxx_want_three_way_comparison) */ #undef __glibcxx_want_three_way_comparison -// from version.def line 981 +// from version.def line 988 #if !defined(__cpp_lib_to_address) # if (__cplusplus >= 202002L) # define __glibcxx_to_address 201711L @@ -1210,7 +1215,7 @@ #endif /* !defined(__cpp_lib_to_address) && defined(__glibcxx_want_to_address) */ #undef __glibcxx_want_to_address -// from version.def line 989 +// from version.def line 996 #if !defined(__cpp_lib_to_array) # if (__cplusplus >= 202002L) && (__cpp_generic_lambdas >= 201707L) # define __glibcxx_to_array 201907L @@ -1221,7 +1226,7 @@ #endif /* !defined(__cpp_lib_to_array) && defined(__glibcxx_want_to_array) */ #undef __glibcxx_want_to_array -// from version.def line 998 +// from version.def line 1005 #if !defined(__cpp_lib_type_identity) # if (__cplusplus >= 202002L) # define __glibcxx_type_identity 201806L @@ -1232,7 +1237,7 @@ #endif /* !defined(__cpp_lib_type_identity) && defined(__glibcxx_want_type_identity) */ #undef __glibcxx_want_type_identity -// from version.def line 1006 +// from version.def line 1013 #if !defined(__cpp_lib_unwrap_ref) # if (__cplusplus >= 202002L) # define __glibcxx_unwrap_ref 201811L @@ -1243,7 +1248,7 @@ #endif /* !defined(__cpp_lib_unwrap_ref) && defined(__glibcxx_want_unwrap_ref) */ #undef __glibcxx_want_unwrap_ref -// from version.def line 1014 +// from version.def line 1021 #if !defined(__cpp_lib_constexpr_iterator) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_iterator 201811L @@ -1254,7 +1259,7 @@ #endif /* !defined(__cpp_lib_constexpr_iterator) && defined(__glibcxx_want_constexpr_iterator) */ #undef __glibcxx_want_constexpr_iterator -// from version.def line 1022 +// from version.def line 1029 #if !defined(__cpp_lib_interpolate) # if (__cplusplus >= 202002L) # define __glibcxx_interpolate 201902L @@ -1265,7 +1270,7 @@ #endif /* !defined(__cpp_lib_interpolate) && defined(__glibcxx_want_interpolate) */ #undef __glibcxx_want_interpolate -// from version.def line 1030 +// from version.def line 1037 #if !defined(__cpp_lib_constexpr_utility) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_utility 201811L @@ -1276,7 +1281,7 @@ #endif /* !defined(__cpp_lib_constexpr_utility) && defined(__glibcxx_want_constexpr_utility) */ #undef __glibcxx_want_constexpr_utility -// from version.def line 1038 +// from version.def line 1045 #if !defined(__cpp_lib_shift) # if (__cplusplus >= 202002L) # define __glibcxx_shift 201806L @@ -1287,7 +1292,7 @@ #endif /* !defined(__cpp_lib_shift) && defined(__glibcxx_want_shift) */ #undef __glibcxx_want_shift -// from version.def line 1046 +// from version.def line 1053 #if !defined(__cpp_lib_ranges) # if (__cplusplus >= 202302L) && (__glibcxx_concepts) # define __glibcxx_ranges 202211L @@ -1303,7 +1308,7 @@ #endif /* !defined(__cpp_lib_ranges) && defined(__glibcxx_want_ranges) */ #undef __glibcxx_want_ranges -// from version.def line 1060 +// from version.def line 1067 #if !defined(__cpp_lib_constexpr_numeric) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_numeric 201911L @@ -1314,7 +1319,7 @@ #endif /* !defined(__cpp_lib_constexpr_numeric) && defined(__glibcxx_want_constexpr_numeric) */ #undef __glibcxx_want_constexpr_numeric -// from version.def line 1068 +// from version.def line 1075 #if !defined(__cpp_lib_constexpr_functional) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_functional 201907L @@ -1325,7 +1330,7 @@ #endif /* !defined(__cpp_lib_constexpr_functional) && defined(__glibcxx_want_constexpr_functional) */ #undef __glibcxx_want_constexpr_functional -// from version.def line 1076 +// from version.def line 1083 #if !defined(__cpp_lib_constexpr_algorithms) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_algorithms 201806L @@ -1336,7 +1341,7 @@ #endif /* !defined(__cpp_lib_constexpr_algorithms) && defined(__glibcxx_want_constexpr_algorithms) */ #undef __glibcxx_want_constexpr_algorithms -// from version.def line 1084 +// from version.def line 1091 #if !defined(__cpp_lib_constexpr_tuple) # if (__cplusplus >= 202002L) # define __glibcxx_constexpr_tuple 201811L @@ -1347,7 +1352,7 @@ #endif /* !defined(__cpp_lib_constexpr_tuple) && defined(__glibcxx_want_constexpr_tuple) */ #undef __glibcxx_want_constexpr_tuple -// from version.def line 1092 +// from version.def line 1099 #if !defined(__cpp_lib_constexpr_memory) # if (__cplusplus >= 202302L) && (__cpp_constexpr_dynamic_alloc) # define __glibcxx_constexpr_memory 202202L @@ -1363,7 +1368,7 @@ #endif /* !defined(__cpp_lib_constexpr_memory) && defined(__glibcxx_want_constexpr_memory) */ #undef __glibcxx_want_constexpr_memory -// from version.def line 1105 +// from version.def line 1112 #if !defined(__cpp_lib_atomic_shared_ptr) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_atomic_shared_ptr 201711L @@ -1374,7 +1379,7 @@ #endif /* !defined(__cpp_lib_atomic_shared_ptr) && defined(__glibcxx_want_atomic_shared_ptr) */ #undef __glibcxx_want_atomic_shared_ptr -// from version.def line 1114 +// from version.def line 1121 #if !defined(__cpp_lib_atomic_wait) # if (__cplusplus >= 202002L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED # define __glibcxx_atomic_wait 201907L @@ -1390,7 +1395,7 @@ #endif /* !defined(__cpp_lib_atomic_wait) && defined(__glibcxx_want_atomic_wait) */ #undef __glibcxx_want_atomic_wait -// from version.def line 1132 +// from version.def line 1139 #if !defined(__cpp_lib_barrier) # if (__cplusplus >= 202002L) && (__cpp_aligned_new && __glibcxx_atomic_wait) # define __glibcxx_barrier 201907L @@ -1401,7 +1406,7 @@ #endif /* !defined(__cpp_lib_barrier) && defined(__glibcxx_want_barrier) */ #undef __glibcxx_want_barrier -// from version.def line 1149 +// from version.def line 1156 #if !defined(__cpp_lib_format) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_format 202106L @@ -1412,7 +1417,7 @@ #endif /* !defined(__cpp_lib_format) && defined(__glibcxx_want_format) */ #undef __glibcxx_want_format -// from version.def line 1162 +// from version.def line 1169 #if !defined(__cpp_lib_constexpr_complex) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_constexpr_complex 201711L @@ -1423,7 +1428,7 @@ #endif /* !defined(__cpp_lib_constexpr_complex) && defined(__glibcxx_want_constexpr_complex) */ #undef __glibcxx_want_constexpr_complex -// from version.def line 1171 +// from version.def line 1178 #if !defined(__cpp_lib_constexpr_dynamic_alloc) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_constexpr_dynamic_alloc 201907L @@ -1434,7 +1439,7 @@ #endif /* !defined(__cpp_lib_constexpr_dynamic_alloc) && defined(__glibcxx_want_constexpr_dynamic_alloc) */ #undef __glibcxx_want_constexpr_dynamic_alloc -// from version.def line 1180 +// from version.def line 1187 #if !defined(__cpp_lib_constexpr_string) # if (__cplusplus >= 202002L) && _GLIBCXX_USE_CXX11_ABI && _GLIBCXX_HOSTED && (defined(__glibcxx_is_constant_evaluated)) # define __glibcxx_constexpr_string 201907L @@ -1455,7 +1460,7 @@ #endif /* !defined(__cpp_lib_constexpr_string) && defined(__glibcxx_want_constexpr_string) */ #undef __glibcxx_want_constexpr_string -// from version.def line 1204 +// from version.def line 1211 #if !defined(__cpp_lib_constexpr_vector) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_constexpr_vector 201907L @@ -1466,7 +1471,7 @@ #endif /* !defined(__cpp_lib_constexpr_vector) && defined(__glibcxx_want_constexpr_vector) */ #undef __glibcxx_want_constexpr_vector -// from version.def line 1213 +// from version.def line 1220 #if !defined(__cpp_lib_erase_if) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_erase_if 202002L @@ -1477,7 +1482,7 @@ #endif /* !defined(__cpp_lib_erase_if) && defined(__glibcxx_want_erase_if) */ #undef __glibcxx_want_erase_if -// from version.def line 1222 +// from version.def line 1229 #if !defined(__cpp_lib_generic_unordered_lookup) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_generic_unordered_lookup 201811L @@ -1488,7 +1493,7 @@ #endif /* !defined(__cpp_lib_generic_unordered_lookup) && defined(__glibcxx_want_generic_unordered_lookup) */ #undef __glibcxx_want_generic_unordered_lookup -// from version.def line 1231 +// from version.def line 1238 #if !defined(__cpp_lib_jthread) # if (__cplusplus >= 202002L) && defined(_GLIBCXX_HAS_GTHREADS) && _GLIBCXX_HOSTED # define __glibcxx_jthread 201911L @@ -1499,7 +1504,7 @@ #endif /* !defined(__cpp_lib_jthread) && defined(__glibcxx_want_jthread) */ #undef __glibcxx_want_jthread -// from version.def line 1241 +// from version.def line 1248 #if !defined(__cpp_lib_latch) # if (__cplusplus >= 202002L) && (__glibcxx_atomic_wait) # define __glibcxx_latch 201907L @@ -1510,7 +1515,7 @@ #endif /* !defined(__cpp_lib_latch) && defined(__glibcxx_want_latch) */ #undef __glibcxx_want_latch -// from version.def line 1250 +// from version.def line 1257 #if !defined(__cpp_lib_list_remove_return_type) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_list_remove_return_type 201806L @@ -1521,7 +1526,7 @@ #endif /* !defined(__cpp_lib_list_remove_return_type) && defined(__glibcxx_want_list_remove_return_type) */ #undef __glibcxx_want_list_remove_return_type -// from version.def line 1259 +// from version.def line 1266 #if !defined(__cpp_lib_polymorphic_allocator) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_polymorphic_allocator 201902L @@ -1532,7 +1537,7 @@ #endif /* !defined(__cpp_lib_polymorphic_allocator) && defined(__glibcxx_want_polymorphic_allocator) */ #undef __glibcxx_want_polymorphic_allocator -// from version.def line 1268 +// from version.def line 1275 #if !defined(__cpp_lib_move_iterator_concept) # if (__cplusplus >= 202002L) && (__glibcxx_concepts) # define __glibcxx_move_iterator_concept 202207L @@ -1543,7 +1548,7 @@ #endif /* !defined(__cpp_lib_move_iterator_concept) && defined(__glibcxx_want_move_iterator_concept) */ #undef __glibcxx_want_move_iterator_concept -// from version.def line 1278 +// from version.def line 1285 #if !defined(__cpp_lib_semaphore) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED && (__glibcxx_atomic_wait || _GLIBCXX_HAVE_POSIX_SEMAPHORE) # define __glibcxx_semaphore 201907L @@ -1554,7 +1559,7 @@ #endif /* !defined(__cpp_lib_semaphore) && defined(__glibcxx_want_semaphore) */ #undef __glibcxx_want_semaphore -// from version.def line 1288 +// from version.def line 1295 #if !defined(__cpp_lib_smart_ptr_for_overwrite) # if (__cplusplus >= 202002L) && _GLIBCXX_HOSTED # define __glibcxx_smart_ptr_for_overwrite 202002L @@ -1565,7 +1570,7 @@ #endif /* !defined(__cpp_lib_smart_ptr_for_overwrite) && defined(__glibcxx_want_smart_ptr_for_overwrite) */ #undef __glibcxx_want_smart_ptr_for_overwrite -// from version.def line 1297 +// from version.def line 1304 #if !defined(__cpp_lib_syncbuf) # if (__cplusplus >= 202002L) && _GLIBCXX_USE_CXX11_ABI && _GLIBCXX_HOSTED # define __glibcxx_syncbuf 201803L @@ -1576,7 +1581,7 @@ #endif /* !defined(__cpp_lib_syncbuf) && defined(__glibcxx_want_syncbuf) */ #undef __glibcxx_want_syncbuf -// from version.def line 1307 +// from version.def line 1314 #if !defined(__cpp_lib_byteswap) # if (__cplusplus >= 202302L) # define __glibcxx_byteswap 202110L @@ -1587,7 +1592,7 @@ #endif /* !defined(__cpp_lib_byteswap) && defined(__glibcxx_want_byteswap) */ #undef __glibcxx_want_byteswap -// from version.def line 1315 +// from version.def line 1322 #if !defined(__cpp_lib_constexpr_charconv) # if (__cplusplus >= 202302L) # define __glibcxx_constexpr_charconv 202207L @@ -1598,7 +1603,7 @@ #endif /* !defined(__cpp_lib_constexpr_charconv) && defined(__glibcxx_want_constexpr_charconv) */ #undef __glibcxx_want_constexpr_charconv -// from version.def line 1323 +// from version.def line 1330 #if !defined(__cpp_lib_constexpr_typeinfo) # if (__cplusplus >= 202302L) # define __glibcxx_constexpr_typeinfo 202106L @@ -1609,7 +1614,7 @@ #endif /* !defined(__cpp_lib_constexpr_typeinfo) && defined(__glibcxx_want_constexpr_typeinfo) */ #undef __glibcxx_want_constexpr_typeinfo -// from version.def line 1331 +// from version.def line 1338 #if !defined(__cpp_lib_expected) # if (__cplusplus >= 202302L) && (__cpp_concepts >= 202002L) # define __glibcxx_expected 202211L @@ -1620,7 +1625,7 @@ #endif /* !defined(__cpp_lib_expected) && defined(__glibcxx_want_expected) */ #undef __glibcxx_want_expected -// from version.def line 1340 +// from version.def line 1347 #if !defined(__cpp_lib_invoke_r) # if (__cplusplus >= 202302L) # define __glibcxx_invoke_r 202106L @@ -1631,7 +1636,7 @@ #endif /* !defined(__cpp_lib_invoke_r) && defined(__glibcxx_want_invoke_r) */ #undef __glibcxx_want_invoke_r -// from version.def line 1348 +// from version.def line 1355 #if !defined(__cpp_lib_is_scoped_enum) # if (__cplusplus >= 202302L) # define __glibcxx_is_scoped_enum 202011L @@ -1642,7 +1647,7 @@ #endif /* !defined(__cpp_lib_is_scoped_enum) && defined(__glibcxx_want_is_scoped_enum) */ #undef __glibcxx_want_is_scoped_enum -// from version.def line 1356 +// from version.def line 1363 #if !defined(__cpp_lib_reference_from_temporary) # if (__cplusplus >= 202302L) && (__has_builtin(__reference_constructs_from_temporary) && __has_builtin(__reference_converts_from_temporary)) # define __glibcxx_reference_from_temporary 202202L @@ -1653,7 +1658,7 @@ #endif /* !defined(__cpp_lib_reference_from_temporary) && defined(__glibcxx_want_reference_from_temporary) */ #undef __glibcxx_want_reference_from_temporary -// from version.def line 1367 +// from version.def line 1374 #if !defined(__cpp_lib_to_underlying) # if (__cplusplus >= 202302L) # define __glibcxx_to_underlying 202102L @@ -1664,7 +1669,7 @@ #endif /* !defined(__cpp_lib_to_underlying) && defined(__glibcxx_want_to_underlying) */ #undef __glibcxx_want_to_underlying -// from version.def line 1375 +// from version.def line 1382 #if !defined(__cpp_lib_unreachable) # if (__cplusplus >= 202302L) # define __glibcxx_unreachable 202202L @@ -1675,7 +1680,7 @@ #endif /* !defined(__cpp_lib_unreachable) && defined(__glibcxx_want_unreachable) */ #undef __glibcxx_want_unreachable -// from version.def line 1383 +// from version.def line 1390 #if !defined(__cpp_lib_ranges_zip) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_zip 202110L @@ -1686,7 +1691,7 @@ #endif /* !defined(__cpp_lib_ranges_zip) && defined(__glibcxx_want_ranges_zip) */ #undef __glibcxx_want_ranges_zip -// from version.def line 1391 +// from version.def line 1398 #if !defined(__cpp_lib_ranges_chunk) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_chunk 202202L @@ -1697,7 +1702,7 @@ #endif /* !defined(__cpp_lib_ranges_chunk) && defined(__glibcxx_want_ranges_chunk) */ #undef __glibcxx_want_ranges_chunk -// from version.def line 1399 +// from version.def line 1406 #if !defined(__cpp_lib_ranges_slide) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_slide 202202L @@ -1708,7 +1713,7 @@ #endif /* !defined(__cpp_lib_ranges_slide) && defined(__glibcxx_want_ranges_slide) */ #undef __glibcxx_want_ranges_slide -// from version.def line 1407 +// from version.def line 1414 #if !defined(__cpp_lib_ranges_chunk_by) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_chunk_by 202202L @@ -1719,7 +1724,7 @@ #endif /* !defined(__cpp_lib_ranges_chunk_by) && defined(__glibcxx_want_ranges_chunk_by) */ #undef __glibcxx_want_ranges_chunk_by -// from version.def line 1415 +// from version.def line 1422 #if !defined(__cpp_lib_ranges_join_with) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_join_with 202202L @@ -1730,7 +1735,7 @@ #endif /* !defined(__cpp_lib_ranges_join_with) && defined(__glibcxx_want_ranges_join_with) */ #undef __glibcxx_want_ranges_join_with -// from version.def line 1423 +// from version.def line 1430 #if !defined(__cpp_lib_ranges_repeat) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_repeat 202207L @@ -1741,7 +1746,7 @@ #endif /* !defined(__cpp_lib_ranges_repeat) && defined(__glibcxx_want_ranges_repeat) */ #undef __glibcxx_want_ranges_repeat -// from version.def line 1431 +// from version.def line 1438 #if !defined(__cpp_lib_ranges_stride) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_stride 202207L @@ -1752,7 +1757,7 @@ #endif /* !defined(__cpp_lib_ranges_stride) && defined(__glibcxx_want_ranges_stride) */ #undef __glibcxx_want_ranges_stride -// from version.def line 1439 +// from version.def line 1446 #if !defined(__cpp_lib_ranges_cartesian_product) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_cartesian_product 202207L @@ -1763,7 +1768,7 @@ #endif /* !defined(__cpp_lib_ranges_cartesian_product) && defined(__glibcxx_want_ranges_cartesian_product) */ #undef __glibcxx_want_ranges_cartesian_product -// from version.def line 1447 +// from version.def line 1454 #if !defined(__cpp_lib_ranges_as_rvalue) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_as_rvalue 202207L @@ -1774,7 +1779,7 @@ #endif /* !defined(__cpp_lib_ranges_as_rvalue) && defined(__glibcxx_want_ranges_as_rvalue) */ #undef __glibcxx_want_ranges_as_rvalue -// from version.def line 1455 +// from version.def line 1462 #if !defined(__cpp_lib_ranges_as_const) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_as_const 202207L @@ -1785,7 +1790,7 @@ #endif /* !defined(__cpp_lib_ranges_as_const) && defined(__glibcxx_want_ranges_as_const) */ #undef __glibcxx_want_ranges_as_const -// from version.def line 1463 +// from version.def line 1470 #if !defined(__cpp_lib_ranges_enumerate) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_enumerate 202302L @@ -1796,7 +1801,7 @@ #endif /* !defined(__cpp_lib_ranges_enumerate) && defined(__glibcxx_want_ranges_enumerate) */ #undef __glibcxx_want_ranges_enumerate -// from version.def line 1471 +// from version.def line 1478 #if !defined(__cpp_lib_ranges_fold) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_fold 202207L @@ -1807,7 +1812,7 @@ #endif /* !defined(__cpp_lib_ranges_fold) && defined(__glibcxx_want_ranges_fold) */ #undef __glibcxx_want_ranges_fold -// from version.def line 1479 +// from version.def line 1486 #if !defined(__cpp_lib_ranges_contains) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_contains 202207L @@ -1818,7 +1823,7 @@ #endif /* !defined(__cpp_lib_ranges_contains) && defined(__glibcxx_want_ranges_contains) */ #undef __glibcxx_want_ranges_contains -// from version.def line 1487 +// from version.def line 1494 #if !defined(__cpp_lib_ranges_iota) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_iota 202202L @@ -1829,7 +1834,7 @@ #endif /* !defined(__cpp_lib_ranges_iota) && defined(__glibcxx_want_ranges_iota) */ #undef __glibcxx_want_ranges_iota -// from version.def line 1495 +// from version.def line 1502 #if !defined(__cpp_lib_ranges_find_last) # if (__cplusplus >= 202302L) # define __glibcxx_ranges_find_last 202207L @@ -1840,7 +1845,7 @@ #endif /* !defined(__cpp_lib_ranges_find_last) && defined(__glibcxx_want_ranges_find_last) */ #undef __glibcxx_want_ranges_find_last -// from version.def line 1503 +// from version.def line 1510 #if !defined(__cpp_lib_constexpr_bitset) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED && (__cpp_constexpr_dynamic_alloc) # define __glibcxx_constexpr_bitset 202202L @@ -1851,7 +1856,7 @@ #endif /* !defined(__cpp_lib_constexpr_bitset) && defined(__glibcxx_want_constexpr_bitset) */ #undef __glibcxx_want_constexpr_bitset -// from version.def line 1513 +// from version.def line 1520 #if !defined(__cpp_lib_stdatomic_h) # if (__cplusplus >= 202302L) # define __glibcxx_stdatomic_h 202011L @@ -1862,7 +1867,7 @@ #endif /* !defined(__cpp_lib_stdatomic_h) && defined(__glibcxx_want_stdatomic_h) */ #undef __glibcxx_want_stdatomic_h -// from version.def line 1521 +// from version.def line 1528 #if !defined(__cpp_lib_adaptor_iterator_pair_constructor) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED # define __glibcxx_adaptor_iterator_pair_constructor 202106L @@ -1873,7 +1878,7 @@ #endif /* !defined(__cpp_lib_adaptor_iterator_pair_constructor) && defined(__glibcxx_want_adaptor_iterator_pair_constructor) */ #undef __glibcxx_want_adaptor_iterator_pair_constructor -// from version.def line 1530 +// from version.def line 1537 #if !defined(__cpp_lib_formatters) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED # define __glibcxx_formatters 202302L @@ -1884,7 +1889,7 @@ #endif /* !defined(__cpp_lib_formatters) && defined(__glibcxx_want_formatters) */ #undef __glibcxx_want_formatters -// from version.def line 1539 +// from version.def line 1546 #if !defined(__cpp_lib_ios_noreplace) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED # define __glibcxx_ios_noreplace 202207L @@ -1895,7 +1900,7 @@ #endif /* !defined(__cpp_lib_ios_noreplace) && defined(__glibcxx_want_ios_noreplace) */ #undef __glibcxx_want_ios_noreplace -// from version.def line 1548 +// from version.def line 1555 #if !defined(__cpp_lib_move_only_function) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED # define __glibcxx_move_only_function 202110L @@ -1906,7 +1911,7 @@ #endif /* !defined(__cpp_lib_move_only_function) && defined(__glibcxx_want_move_only_function) */ #undef __glibcxx_want_move_only_function -// from version.def line 1557 +// from version.def line 1564 #if !defined(__cpp_lib_spanstream) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED && (__glibcxx_span) # define __glibcxx_spanstream 202106L @@ -1917,7 +1922,7 @@ #endif /* !defined(__cpp_lib_spanstream) && defined(__glibcxx_want_spanstream) */ #undef __glibcxx_want_spanstream -// from version.def line 1567 +// from version.def line 1574 #if !defined(__cpp_lib_stacktrace) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED && (_GLIBCXX_HAVE_STACKTRACE) # define __glibcxx_stacktrace 202011L @@ -1928,7 +1933,7 @@ #endif /* !defined(__cpp_lib_stacktrace) && defined(__glibcxx_want_stacktrace) */ #undef __glibcxx_want_stacktrace -// from version.def line 1577 +// from version.def line 1584 #if !defined(__cpp_lib_string_contains) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED # define __glibcxx_string_contains 202011L @@ -1939,7 +1944,7 @@ #endif /* !defined(__cpp_lib_string_contains) && defined(__glibcxx_want_string_contains) */ #undef __glibcxx_want_string_contains -// from version.def line 1586 +// from version.def line 1593 #if !defined(__cpp_lib_string_resize_and_overwrite) # if (__cplusplus >= 202302L) && _GLIBCXX_HOSTED # define __glibcxx_string_resize_and_overwrite 202110L @@ -1950,7 +1955,7 @@ #endif /* !defined(__cpp_lib_string_resize_and_overwrite) && defined(__glibcxx_want_string_resize_and_overwrite) */ #undef __glibcxx_want_string_resize_and_overwrite -// from version.def line 1595 +// from version.def line 1602 #if !defined(__cpp_lib_ratio) # if (__cplusplus > 202302L) # define __glibcxx_ratio 202306L @@ -1961,7 +1966,7 @@ #endif /* !defined(__cpp_lib_ratio) && defined(__glibcxx_want_ratio) */ #undef __glibcxx_want_ratio -// from version.def line 1603 +// from version.def line 1610 #if !defined(__cpp_lib_to_string) # if (__cplusplus > 202302L) && _GLIBCXX_HOSTED && (__glibcxx_to_chars) # define __glibcxx_to_string 202306L diff --git a/libstdc++-v3/include/std/charconv b/libstdc++-v3/include/std/charconv index 01711d38576..7edb6ade3d4 100644 --- a/libstdc++-v3/include/std/charconv +++ b/libstdc++-v3/include/std/charconv @@ -62,6 +62,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201703L && __cpp_impl_three_way_comparison >= 201907L friend bool operator==(const to_chars_result&, const to_chars_result&) = default; +#endif +#if __cplusplus > 202302L + constexpr explicit operator bool() const noexcept { return ec == errc{}; } #endif }; @@ -74,6 +77,9 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION #if __cplusplus > 201703L && __cpp_impl_three_way_comparison >= 201907L friend bool operator==(const from_chars_result&, const from_chars_result&) = default; +#endif +#if __cplusplus > 202302L + constexpr explicit operator bool() const noexcept { return ec == errc{}; } #endif }; diff --git a/libstdc++-v3/testsuite/20_util/from_chars/result.cc b/libstdc++-v3/testsuite/20_util/from_chars/result.cc new file mode 100644 index 00000000000..637678ac532 --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/from_chars/result.cc @@ -0,0 +1,21 @@ +// { dg-do run { target c++26 } } + +#include +#include + +void +test_result() +{ + static_assert( ! std::is_convertible_v ); + static_assert( std::is_constructible_v ); + + std::from_chars_result res{}; + VERIFY( res ); + res.ec = std::errc::invalid_argument; + VERIFY( !res ); +} + +int main() +{ + test_result(); +} diff --git a/libstdc++-v3/testsuite/20_util/to_chars/result.cc b/libstdc++-v3/testsuite/20_util/to_chars/result.cc new file mode 100644 index 00000000000..5284680460a --- /dev/null +++ b/libstdc++-v3/testsuite/20_util/to_chars/result.cc @@ -0,0 +1,25 @@ +// { dg-do run { target c++26 } } + +#include +#include + +#if defined(__cpp_lib_to_chars) && __cpp_lib_to_chars < 202306L +# error "Feature-test macro for std::to_chars has wrong value in " +#endif + +void +test_result() +{ + static_assert( ! std::is_convertible_v ); + static_assert( std::is_constructible_v ); + + std::to_chars_result res{}; + VERIFY( res ); + res.ec = std::errc::invalid_argument; + VERIFY( !res ); +} + +int main() +{ + test_result(); +} diff --git a/libstdc++-v3/testsuite/20_util/to_chars/version.cc b/libstdc++-v3/testsuite/20_util/to_chars/version.cc index 2789afa28ef..f7866ec5377 100644 --- a/libstdc++-v3/testsuite/20_util/to_chars/version.cc +++ b/libstdc++-v3/testsuite/20_util/to_chars/version.cc @@ -6,7 +6,7 @@ #ifndef __cpp_lib_to_chars # error "Feature-test macro for to_chars missing in " -#elif __cpp_lib_to_chars != 201611L +#elif __cpp_lib_to_chars != (__cplusplus == 202302L ? 201611L : 202306L) # error "Feature-test macro for to_chars has wrong value in " #endif