gcc/libstdc++-v3/include
Jonathan Wakely 42cda3ba45 libstdc++: Fix std::reverse_iterator relational operators
My recent changes to reverse_iterator's comparisons was not the version
of the code (or tests) that I meant to commit, and broke the relational
operators. This fixes them to reverse the order of the comparisons on
the base() iterators.

This also replaces the SFINAE constraints in the return type of the
reverse_iterator and move_iterator comparisons with a requires-clause.
This ensures the constrained overloads are preferred to unconstrained
ones. This means the non-standard same-type overloads can be omitted for
C++20 because they're not needed to solve the problem with std::rel_ops
or the testsuite's greedy_ops::X type.

	* include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
	to constrain C++20 versions of comparison operators. Fix backwards
	logic of relational operators.
	(move_iterator): Use requires-clause to constrain comparison operators
	in C++20. Do not declare non-standard same-type overloads for C++20.
	* testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
	of comparisons and check using greedy_ops type.
	* testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
	* testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
	main function from compile-only test.
	* testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
2020-03-28 21:52:13 +00:00
..
backward
bits libstdc++: Fix std::reverse_iterator relational operators 2020-03-28 21:52:13 +00:00
c
c_compatibility
c_global
c_std
debug libstdc++: Define <=> for Debug Mode array 2020-02-27 15:13:16 +00:00
decimal
experimental libstdc++: Fix experimental::path::generic_string (PR 93245) 2020-03-21 22:11:44 +00:00
ext
parallel
precompiled
pstl
std libstdc++: Define __cpp_lib_ranges macro for C++20 2020-03-27 23:26:03 +00:00
tr1
tr2
Makefile.am
Makefile.in