diff options
author | Jonathan Wakely <jwakely@redhat.com> | 2020-04-21 23:43:27 +0100 |
---|---|---|
committer | Jonathan Wakely <jwakely@redhat.com> | 2020-04-21 23:46:54 +0100 |
commit | 87841658d4fa5174d1797ee0abc73b3b3f11cad4 (patch) | |
tree | 6521b688b2dcde6cafaebba2957f917bb10c959c /gcc/fortran/scanner.c | |
parent | 0e665f256b4ac8c5f78713ebd4e9378fd4ecf5a8 (diff) | |
download | gcc-87841658d4fa5174d1797ee0abc73b3b3f11cad4.zip gcc-87841658d4fa5174d1797ee0abc73b3b3f11cad4.tar.gz gcc-87841658d4fa5174d1797ee0abc73b3b3f11cad4.tar.bz2 |
libstdc++: Fix __normal_iterator comparisons for C++20
This fixes a regression introduced when I replaced __normal_iterator's
relational operators with operator<=>. If the wrapped iterator type
doesn't define operator<=> then __normal_iterator doesdn't either, which
breaks any use of fancy pointers that don't define <=>. The regression
was found when trying to build cmcstl2.
The solution is to use synth-three-way to define __normal_iterator's
spaceship operator, so that it is still defined even if the wrapped type
only supports operator<.
* include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
to define operator<=>.
* testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
Diffstat (limited to 'gcc/fortran/scanner.c')
0 files changed, 0 insertions, 0 deletions