gcc/libstdc++-v3/testsuite/20_util
Jonathan Wakely 7f397e4519 libstdc++: Implement spaceship for std::pair (P1614R2)
This defines operator<=> as a non-member function template and does not
alter operator==. This contradicts the changes made by P1614R2, which
specify both as hidden friends, but that specification of operator<=> is
broken and the subject of a soon-to-be-published LWG issue.

	* include/bits/stl_pair.h [__cpp_lib_three_way_comparison]
	(operator<=>): Define for C++20.
	* libsupc++/compare (__cmp2way_res_t): Rename to __cmp3way_res_t,
	move into __detail namespace. Do not turn argument types into lvalues.
	(__cmp3way_helper): Rename to __cmp3way_res_impl, move into __detail
	namespace. Constrain with concepts instead of using void_t.
	(compare_three_way_result): Adjust name of base class.
	(compare_three_way_result_t): Use __cmp3way_res_impl directly.
	(__detail::__3way_cmp_with): Add workaround for PR 91073.
	(compare_three_way): Use workaround.
	(__detail::__synth3way, __detail::__synth3way_t): Define new helpers
	implementing synth-three-way and synth-three-way-result semantics.
	* testsuite/20_util/pair/comparison_operators/constexpr_c++20.cc: New
	test.

From-SVN: r278951
2019-12-03 23:57:46 +00:00
..
add_const Update copyright years. 2019-01-01 13:31:55 +01:00
add_cv Update copyright years. 2019-01-01 13:31:55 +01:00
add_lvalue_reference Update copyright years. 2019-01-01 13:31:55 +01:00
add_pointer Improve tests for std::add_pointer 2019-10-31 14:07:11 +00:00
add_rvalue_reference Update copyright years. 2019-01-01 13:31:55 +01:00
add_volatile Update copyright years. 2019-01-01 13:31:55 +01:00
addressof Update copyright years. 2019-01-01 13:31:55 +01:00
align Update copyright years. 2019-01-01 13:31:55 +01:00
aligned_storage Update copyright years. 2019-01-01 13:31:55 +01:00
aligned_union Update copyright years. 2019-01-01 13:31:55 +01:00
alignment_of Update copyright years. 2019-01-01 13:31:55 +01:00
allocator Fix compilation with Clang 2019-10-25 18:02:35 +01:00
allocator_traits Fix some missing/incorrect feature test macros 2019-10-30 16:57:13 +00:00
any trans.c (check_inlining_for_nested_subprog): Quote reserved names. 2019-05-17 11:55:43 -06:00
as_const Update copyright years. 2019-01-01 13:31:55 +01:00
assume_aligned Update copyright years. 2019-01-01 13:31:55 +01:00
auto_ptr Update copyright years. 2019-01-01 13:31:55 +01:00
bad_function_call Fix tests that fail without PCH 2019-06-17 09:18:17 +01:00
bind Add remaining changes from P1065R2 "constexpr INVOKE" 2019-10-31 23:03:22 +00:00
bool_constant Update copyright years. 2019-01-01 13:31:55 +01:00
common_reference/requirements Implement std::common_reference for C++20 2019-09-10 17:28:27 +01:00
common_type/requirements PR libstdc++/89102 implement new common_type rules (P0435R1, P0548R1) 2019-05-07 23:46:39 +01:00
conditional/requirements Update copyright years. 2019-01-01 13:31:55 +01:00
decay/requirements Update copyright years. 2019-01-01 13:31:55 +01:00
declval/requirements Update copyright years. 2019-01-01 13:31:55 +01:00
default_delete PR libstdc++/90388 fix std::hash<unique_ptr<T,D>> bugs 2019-05-10 22:41:16 +01:00
duration PR libstdc++/89102 implement new common_type rules (P0435R1, P0548R1) 2019-05-07 23:46:39 +01:00
duration_cast Update copyright years. 2019-01-01 13:31:55 +01:00
enable_if/requirements Update copyright years. 2019-01-01 13:31:55 +01:00
enable_shared_from_this PR middle-end/89303 add testcase for std::enable_shared_from_this 2019-02-14 09:40:02 +00:00
exchange Implement C++20 p1424 - 'constexpr' feature macro concerns... 2019-09-10 03:38:58 +00:00
extent Update copyright years. 2019-01-01 13:31:55 +01:00
forward Add iterator concepts and range access customization points for C++20 2019-10-29 17:44:18 +00:00
from_chars PR c++/90047 - ICE with enable_if alias template. 2019-04-17 23:32:24 -04:00
function PR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues 2019-08-15 17:07:27 +01:00
function_objects Forgot to change teh date range. 2019-11-15 21:27:49 +00:00
has_unique_object_representations Update copyright years. 2019-01-01 13:31:55 +01:00
has_virtual_destructor Update copyright years. 2019-01-01 13:31:55 +01:00
hash Disable tests that aren't valid in parallel mode 2019-10-01 22:02:17 +01:00
headers PR c++/91369 Implement P0784R7 changes to allocation and construction 2019-10-23 18:42:11 +01:00
in_place Update copyright years. 2019-01-01 13:31:55 +01:00
integer_sequence Update copyright years. 2019-01-01 13:31:55 +01:00
integral_constant Update copyright years. 2019-01-01 13:31:55 +01:00
is_abstract Remove redundant static assertions in [meta.unary.prop] traits 2019-06-06 13:13:47 +01:00
is_aggregate Remove redundant static assertions in [meta.unary.prop] traits 2019-06-06 13:13:47 +01:00
is_arithmetic Update copyright years. 2019-01-01 13:31:55 +01:00
is_array Update copyright years. 2019-01-01 13:31:55 +01:00
is_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_base_of Update copyright years. 2019-01-01 13:31:55 +01:00
is_bounded_array Add feature test macro for bounded array traits 2019-03-06 15:31:06 +00:00
is_class PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_complete_or_unbounded PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_compound Update copyright years. 2019-01-01 13:31:55 +01:00
is_const Update copyright years. 2019-01-01 13:31:55 +01:00
is_constant_evaluated Update copyright years. 2019-01-01 13:31:55 +01:00
is_constructible PR c++/90532 Ensure __is_constructible(T[]) is false 2019-05-20 12:32:51 +01:00
is_convertible Update copyright years. 2019-01-01 13:31:55 +01:00
is_copy_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_copy_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_default_constructible PR c++/90532 Ensure __is_constructible(T[]) is false 2019-05-20 12:32:51 +01:00
is_destructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_empty Remove redundant static assertions in [meta.unary.prop] traits 2019-06-06 13:13:47 +01:00
is_enum Update copyright years. 2019-01-01 13:31:55 +01:00
is_final Remove redundant static assertions in [meta.unary.prop] traits 2019-06-06 13:13:47 +01:00
is_floating_point Update copyright years. 2019-01-01 13:31:55 +01:00
is_function PR libstdc++/91371 make std::is_function handle other calling conventions 2019-08-20 22:21:15 +01:00
is_fundamental Update copyright years. 2019-01-01 13:31:55 +01:00
is_implicitly_default_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_integral P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
is_invocable PR libstdc++/91456 make INVOKE<R> work with uncopyable prvalues 2019-08-15 17:07:27 +01:00
is_literal_type Update copyright years. 2019-01-01 13:31:55 +01:00
is_lvalue_reference Update copyright years. 2019-01-01 13:31:55 +01:00
is_member_function_pointer PR libstdc++/91371 make std::is_function handle other calling conventions 2019-08-20 22:21:15 +01:00
is_member_object_pointer Update copyright years. 2019-01-01 13:31:55 +01:00
is_member_pointer Update copyright years. 2019-01-01 13:31:55 +01:00
is_move_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_move_constructible PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_nothrow_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_convertible Add __is_nothrow_convertible to fix std::is_nothrow_invocable_r 2019-05-14 15:39:58 +01:00
is_nothrow_copy_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_copy_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_default_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_destructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_invocable Fix tests that fail with -std=gnu++98 or -std=gnu++11 2019-06-06 13:13:42 +01:00
is_nothrow_move_assignable PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_nothrow_move_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_swappable Update copyright years. 2019-01-01 13:31:55 +01:00
is_nothrow_swappable_with Update copyright years. 2019-01-01 13:31:55 +01:00
is_null_pointer Update copyright years. 2019-01-01 13:31:55 +01:00
is_object PR libstdc++/91371 make std::is_function handle other calling conventions 2019-08-20 22:21:15 +01:00
is_pod Update copyright years. 2019-01-01 13:31:55 +01:00
is_pointer Update copyright years. 2019-01-01 13:31:55 +01:00
is_polymorphic Remove redundant static assertions in [meta.unary.prop] traits 2019-06-06 13:13:47 +01:00
is_reference PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_rvalue_reference Update copyright years. 2019-01-01 13:31:55 +01:00
is_same Update copyright years. 2019-01-01 13:31:55 +01:00
is_scalar Update copyright years. 2019-01-01 13:31:55 +01:00
is_signed Update copyright years. 2019-01-01 13:31:55 +01:00
is_standard_layout Update copyright years. 2019-01-01 13:31:55 +01:00
is_swappable Update copyright years. 2019-01-01 13:31:55 +01:00
is_swappable_with Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivial Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivially_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivially_constructible PR c++/90532 Ensure __is_constructible(T[]) is false 2019-05-20 12:32:51 +01:00
is_trivially_copy_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivially_copy_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivially_copyable CWG 2094 - volatile scalars are trivially copyable. 2019-05-20 19:10:57 +00:00
is_trivially_default_constructible PR c++/90532 Ensure __is_constructible(T[]) is false 2019-05-20 12:32:51 +01:00
is_trivially_destructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivially_move_assignable Update copyright years. 2019-01-01 13:31:55 +01:00
is_trivially_move_constructible Update copyright years. 2019-01-01 13:31:55 +01:00
is_unbounded_array PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_union PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_unsigned Update copyright years. 2019-01-01 13:31:55 +01:00
is_void PR libstdc++/71579 assert that type traits are not misused with incomplete types 2019-05-31 11:35:03 +01:00
is_volatile Update copyright years. 2019-01-01 13:31:55 +01:00
logical_traits Update copyright years. 2019-01-01 13:31:55 +01:00
make_signed/requirements P0482R5 char8_t: Updates to existing standard library tests 2019-02-22 01:16:08 +00:00
make_unsigned/requirements Update copyright years. 2019-01-01 13:31:55 +01:00
memory_resource Update copyright years. 2019-01-01 13:31:55 +01:00
monotonic_buffer_resource Update copyright years. 2019-01-01 13:31:55 +01:00
move Update copyright years. 2019-01-01 13:31:55 +01:00
move_if_noexcept Update copyright years. 2019-01-01 13:31:55 +01:00
nonesuch nonesuch is insufficiently useless (lwg2996) 2019-05-14 16:48:27 +01:00
optional Add constexpr to std::optional::value_or(U&&)&& 2019-04-17 14:13:30 +01:00
owner_less Update copyright years. 2019-01-01 13:31:55 +01:00
pair libstdc++: Implement spaceship for std::pair (P1614R2) 2019-12-03 23:57:46 +00:00
pointer_safety Update copyright years. 2019-01-01 13:31:55 +01:00
pointer_traits Constexpr in std::pointer_traits (P1006R1) 2019-03-06 11:32:42 +00:00
polymorphic_allocator Tweak C++2a uses-allocator construction utilities 2019-04-26 14:15:54 +01:00
rank Update copyright years. 2019-01-01 13:31:55 +01:00
ratio Improve API docs for <chrono> and <ratio> 2019-05-07 23:46:53 +01:00
raw_storage_iterator Update copyright years. 2019-01-01 13:31:55 +01:00
reference_wrapper Add remaining changes from P1065R2 "constexpr INVOKE" 2019-10-31 23:03:22 +00:00
remove_all_extents Update copyright years. 2019-01-01 13:31:55 +01:00
remove_const Update copyright years. 2019-01-01 13:31:55 +01:00
remove_cv Update copyright years. 2019-01-01 13:31:55 +01:00
remove_cvref Update copyright years. 2019-01-01 13:31:55 +01:00
remove_extent Update copyright years. 2019-01-01 13:31:55 +01:00
remove_pointer Update copyright years. 2019-01-01 13:31:55 +01:00
remove_reference Update copyright years. 2019-01-01 13:31:55 +01:00
remove_volatile Update copyright years. 2019-01-01 13:31:55 +01:00
result_of Fix libstdc++ tests for -Wvolatile warnings in C++2a mode 2019-09-11 12:38:15 +01:00
scoped_allocator PR c++/91369 Implement P0784R7 changes to allocation and construction 2019-10-23 18:42:11 +01:00
shared_ptr Fix tests that fail without PCH 2019-06-17 09:18:17 +01:00
specialized_algorithms PR c++/91369 Implement P0784R7 changes to allocation and construction 2019-10-23 18:42:11 +01:00
steady_clock Update copyright years. 2019-01-01 13:31:55 +01:00
synchronized_pool_resource Update copyright years. 2019-01-01 13:31:55 +01:00
system_clock Update copyright years. 2019-01-01 13:31:55 +01:00
time_point P0972R0 <chrono> zero(), min(), and max() should be noexcept 2019-01-11 23:41:05 +00:00
time_point_cast Update copyright years. 2019-01-01 13:31:55 +01:00
to_address Update copyright years. 2019-01-01 13:31:55 +01:00
to_chars LWG 3266. to_chars(bool) should be deleted 2019-09-10 10:08:20 +01:00
tuple Implement the <tuple> part of C++20 p1032 Misc constexpr bits. 2019-11-16 03:16:35 +00:00
type_identity/requirements Update copyright years. 2019-01-01 13:31:55 +01:00
typeindex Update copyright years. 2019-01-01 13:31:55 +01:00
underlying_type/requirements P0340R2 Making std::underlying_type SFINAE-friendly 2019-02-23 21:19:00 +00:00
unique_ptr PR libstdc++/91308 fix constraints on unique_ptr assignment 2019-07-31 15:38:26 +01:00
unsynchronized_pool_resource Update copyright years. 2019-01-01 13:31:55 +01:00
unwrap_reference Corrections for C++2a std::unwrap_reference traits 2019-04-23 11:27:14 +01:00
uses_allocator Implement the <tuple> part of C++20 p1032 Misc constexpr bits. 2019-11-16 03:16:35 +00:00
variant Fix std::variant test for ILP32 targets 2019-05-17 15:13:43 +01:00
void_t Update copyright years. 2019-01-01 13:31:55 +01:00
weak_ptr Update copyright years. 2019-01-01 13:31:55 +01:00
rel_ops.cc Update copyright years. 2019-01-01 13:31:55 +01:00
temporary_buffer.cc Update copyright years. 2019-01-01 13:31:55 +01:00
variable_templates_for_traits.cc Update copyright years. 2019-01-01 13:31:55 +01:00