gcc/libstdc++-v3
Jonathan Wakely 2c7fb16b52 libstdc++: Fix ambiguous comparisons for iterators in C++20
Since r11-1571 (c++: Refinements to "more constrained") was changed in
the front end, the following comment from stl_iterator.h stopped being
true:

  // These extra overloads are not needed in C++20, because the ones above
  // are constrained with a requires-clause and so overload resolution will
  // prefer them to greedy unconstrained function templates.

The requires-clause is no longer considered when comparing unrelated
function templates. That means that the constrained operator== specified
in the standard is no longer more constrained than the pathological
comparison operators defined in the testsuite_greedy_ops.h header. This
was causing several tests to FAIL in C++20 mode:

FAIL: 23_containers/deque/types/1.cc (test for excess errors)
FAIL: 23_containers/vector/types/1.cc (test for excess errors)
FAIL: 24_iterators/move_iterator/greedy_ops.cc (test for excess errors)
FAIL: 24_iterators/normal_iterator/greedy_ops.cc (test for excess errors)
FAIL: 24_iterators/reverse_iterator/greedy_ops.cc (test for excess errors)

The solution is to restore some of the non-standard comparison operators
that are more specialized than the greedy operators in the testsuite.

libstdc++-v3/ChangeLog:

	* include/bits/stl_iterator.h (operator==, operator<=>): Define
	overloads for homogeneous specializations of reverse_iterator,
	__normal_iterator and move_iterator.
2021-12-09 23:19:03 +00:00
..
config libstdc++: Implement std::ios_base::noreplace for C++23 [PR59769] 2021-12-09 22:59:48 +00:00
doc libstdc++: Allow std::condition_variable waits to be cancelled [PR103382] 2021-12-09 22:58:19 +00:00
include libstdc++: Fix ambiguous comparisons for iterators in C++20 2021-12-09 23:19:03 +00:00
libsupc++ libstdc++: Make std::make_exception_ptr work with -fno-exceptions [PR85813] 2021-12-09 23:12:20 +00:00
po
python
scripts
src libstdc++: Allow std::condition_variable waits to be cancelled [PR103382] 2021-12-09 22:58:19 +00:00
testsuite libstdc++: Remove bogus dg-error for effective-target c++20 2021-12-09 23:18:24 +00:00
acinclude.m4 libstdc++: Remove broken std::allocator base classes [PR103340] 2021-12-02 16:46:28 +00:00
aclocal.m4
ChangeLog Daily bump. 2021-12-09 00:16:31 +00:00
ChangeLog-1998
ChangeLog-1999
ChangeLog-2000
ChangeLog-2001
ChangeLog-2002
ChangeLog-2003
ChangeLog-2004
ChangeLog-2005
ChangeLog-2006
ChangeLog-2007
ChangeLog-2008
ChangeLog-2009
ChangeLog-2010
ChangeLog-2011
ChangeLog-2012
ChangeLog-2013
ChangeLog-2014
ChangeLog-2015
ChangeLog-2016
ChangeLog-2017
ChangeLog-2018
ChangeLog-2019
ChangeLog-2020
config.h.in
configure libstdc++: Remove broken std::allocator base classes [PR103340] 2021-12-02 16:46:28 +00:00
configure.ac
configure.host
crossconfig.m4
fragment.am
linkage.m4
Makefile.am
Makefile.in
README

file: libstdc++-v3/README

New users may wish to point their web browsers to the file
index.html in the 'doc/html' subdirectory.  It contains brief
building instructions and notes on how to configure the library in
interesting ways.