libstdc++: Enable three-way comparison for iota_view iterators
authorJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 11:31:12 +0000 (11:31 +0000)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 7 Feb 2020 11:39:12 +0000 (11:39 +0000)
commit5713834e4b99e4c4c99eef15698a497f091b7dc4
treed4a1c39fd7d1c54e158db18a6cfee065ce9721ea
parentea5ca698dca15dc86b823661ac357a30b49dd0f6
libstdc++: Enable three-way comparison for iota_view iterators

The declaration of operator<=> was disabled due to a typo in the macro.
The declaration was also ill-formed when three_way_comparable<_Winc> is
not satisfied, which is a defect in the C++20 draft.

* include/std/ranges (iota_view::_Iterator): Fix typo in name of
__cpp_lib_three_way_comparison macro and use deduced return type for
operator<=>.
* testsuite/std/ranges/iota/iterator.cc: New test.
libstdc++-v3/ChangeLog
libstdc++-v3/include/std/ranges
libstdc++-v3/testsuite/std/ranges/iota/iterator.cc [new file with mode: 0644]