Namespaces
Variants

operator==,<,>,<=,>=,<=>(ranges::concat_view::iterator)

Von de.cppreference.net
 
 
Bereichsbibliothek
Bereichsadapter
 
 
friend constexpr bool operator==
    ( const /*iterator*/& x, std::default_sentinel_t );
(1) (seit C++26)
friend constexpr bool operator==
    ( const /*iterator*/& x, const /*iterator*/& y )
    requires (std::equality_comparable<ranges::iterator_t<
        std::conditional_t<Const, const Views, Views>>> && ...);
(2) (seit C++26)
friend constexpr bool operator<
    ( const /*iterator*/& x, const /*iterator*/& y )
    requires /*all-random-access*/<Const, Views...>;
(3) (seit C++26)
friend constexpr bool operator>
    ( const /*iterator*/& x, const /*iterator*/& y )
    requires /*all-random-access*/<Const, Views...>;
(4) (seit C++26)
friend constexpr bool operator<=
    ( const /*iterator*/& x, const /*iterator*/& y )
    requires /*all-random-access*/<Const, Views...>;
(5) (seit C++26)
friend constexpr bool operator>=
    ( const /*iterator*/& x, const /*iterator*/& y )
    requires /*all-random-access*/<Const, Views...>;
(6) (seit C++26)
friend constexpr auto operator<=>
    ( const /*iterator*/& x, const /*iterator*/& y )
    requires (/*all-random-access*/<Const, Views...> &&
              (std::three_way_comparable<ranges::iterator_t<
                   std::conditional_t<Const, const Views, Views>>> && ...));
(7) (seit C++26)

Vergleicht den Iterator mit einem anderen Iterator oder einem Sentinel.

1) Vergleicht einen Iterator mit einem Sentinel.
Wenn x.it_ .valueless_by_exception() true ist, ist das Verhalten undefiniert.
2-7) Vergleicht zwei Iteratoren. Der != Operator wird aus synthetisiert von operator==.
Wenn x.it_ .valueless_by_exception() || y.it_ .valueless_by_exception() true ist, ist das Verhalten undefiniert.

Diese Funktionen sind für die gewöhnliche unqualifizierte oder qualifizierte Namenssuche nicht sichtbar und können nur durch argumentabhängige Namenssuche gefunden werden, wenn std::ranges::concat_view::iterator <Const> eine assoziierte Klasse der Argumente ist.

Parameter

x, y - zu vergleichende Iteratoren

Rückgabewert

1)

x. it_  . index ( ) == ( sizeof... ( Views ) - 1 ) &&
x. get-iter  < sizeof... ( Views ) - 1 > ( ) == x. get-end  < sizeof... ( Views ) - 1 > ( )

2) x. it_ == y. it_
3) x. it_ < y. it_
4) x. it_ > y. it_
5) x. it_ <= y. it_
6) x. it_ >= y. it_
7) x. it_ <=> y. it_

Beispiel