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.
Showing
Please
register
or
sign in
to comment