gcc/libstdc++-v3
Jonathan Wakely 979e89a9a9 libstdc++: Fix std::reverse_iterator comparisons (PR 94354)
The std::reverse_iterator comparisons have always been implemented only
in terms of equality and less than. In C++98 that made no difference for
reasonable code, because when the underlying operators are the same type
they are required to support all comparisons anyway.

But since LWG 280 it's possible to compare reverse_iterator<X> and
reverse_iterator<Y>, and comparisons between X and Y might not support
the full set of equality and relational operators. This means that it
matters whether we implement operator!= as x.base() != y.base() or
!(x.base() == y.base()), and the current implementation is
non-conforming.

This was already fixed in GCC 10.1 for C++20, this change also fixes it
for all other -std modes.

	PR libstdc++/94354
	* include/bits/stl_iterator.h (reverse_iterator): Fix comparison
	operators to use the correct operations on the underlying
	iterators.
	* testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
2020-05-27 21:58:56 +01:00
..
config Update the baseline symbols for SPARC64/Linux 2020-05-07 10:56:51 +02:00
doc libstdc++: Document library versioning for 9.[123] and 10.1 2020-05-06 10:30:15 +01:00
include libstdc++: Fix std::reverse_iterator comparisons (PR 94354) 2020-05-27 21:58:56 +01:00
libsupc++ libstdc++: Fix the return type of __cxa_finalize 2020-05-04 23:07:19 +01:00
po
python libstdc++: Fix regression in libstdc++-prettyprinters/cxx20.cc 2020-02-17 13:20:57 +00:00
scripts
src libstdc++: Refactor filesystem::path string conversions 2020-05-23 09:40:16 +01:00
testsuite libstdc++: Fix std::reverse_iterator comparisons (PR 94354) 2020-05-27 21:58:56 +01:00
acinclude.m4
aclocal.m4
ChangeLog Daily bump. 2020-05-27 07:45:56 +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
config.h.in
configure x86: Also check if -fcf-protection works 2020-05-15 09:07:17 -07: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.