https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112490
Chameleon <gessos.paul at yahoo dot gr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gessos.paul at yahoo dot gr --- Comment #4 from Chameleon <gessos.paul at yahoo dot gr> --- The same (14.2): https://godbolt.org/z/MhM6Yqfo4 #include <concepts> #include <iterator> using namespace std; template <class Iter> struct permutated_iterator { Iter iter{}; constexpr permutated_iterator(Iter iter) noexcept : iter(iter) { } constexpr bool operator==(const permutated_iterator& rhs) const noexcept { return iter == rhs.iter; } constexpr auto operator<=>(const permutated_iterator& rhs) const noexcept { return iter <=> rhs.iter; } }; int main() { using piter = unsigned int*; using cpiter = std::basic_const_iterator<piter> ; using iter1 = permutated_iterator<piter> ; using iter2 = permutated_iterator<std::basic_const_iterator<unsigned int*>>; static_assert(std::totally_ordered<piter>); static_assert(std::totally_ordered<cpiter>); static_assert(std::totally_ordered<iter1>); static_assert(std::totally_ordered<iter2>); // PROBLEM!!!! // this is ok: iter2() == iter2() // this is not ok: iter2() > iter2()