std::basic_const_iterator<Iter>:operator==,<,<=,>,>=,<=>
Von cppreference.com
< cpp | iterator | basic const iterator
| Gleichheitsvergleich |
||
template< std::sentinel_for<Iter> S > constexpr bool operator==( const S& s ) const; |
(1) | (seit C++23) |
| Relationale Vergleiche zwischen zwei basic_const_iterators |
||
| constexpr bool operator<( const basic_const_iterator& y ) const requires std::random_access_iterator<Iter>; |
(2) | (seit C++23) |
| constexpr bool operator>( const basic_const_iterator& y ) const requires std::random_access_iterator<Iter>; |
(3) | (seit C++23) |
| constexpr bool operator<=( const basic_const_iterator& y ) const requires std::random_access_iterator<Iter>; |
(4) | (seit C++23) |
| constexpr bool operator>=( const basic_const_iterator& y ) const requires std::random_access_iterator<Iter>; |
(5) | (seit C++23) |
| constexpr auto operator<=>( const basic_const_iterator& y ) const requires std::random_access_iterator<Iter>&& std::three_way_comparable<Iter>; |
(6) | (seit C++23) |
| Relationale Vergleiche zwischen basic_const_iterator und einem anderen Typ |
||
| template< /*different-from*/<basic_const_iterator> I > constexpr bool operator<( const I& y ) const |
(7) | (seit C++23) |
| template< /*different-from*/<basic_const_iterator> I > constexpr bool operator>( const I& y ) const |
(8) | (seit C++23) |
| template< /*different-from*/<basic_const_iterator> I > constexpr bool operator<=( const I& y ) const |
(9) | (seit C++23) |
| template< /*different-from*/<basic_const_iterator> I > constexpr bool operator>=( const I& y ) const |
(10) | (seit C++23) |
| template< /*different-from*/<basic_const_iterator> I > constexpr auto operator<=>( const I& y ) const |
(11) | (seit C++23) |
Vergleicht ein basic_const_iterator mit einem anderen Wert.
Der Operator != wird aus operator== synthetisiert.
I erfüllt /*different-from*/<basic_const_iterator>, wenn std::same_as<I, basic_const_iterator<Iter>> falsch ist.
Inhalt |
[edit] Parameter
| s | - | ein Sentinel für Iter |
| y | - | ein Wert zum Vergleichen |
[edit] Rückgabewert
1) base() == s
2) base() < y.base()
3) base() > y.base()
4) base() <= y.base()
5) base() >= y.base()
6) base() <=> y.base()
7) base() < y
8) base() > y
9) base() <= y
10) base() >= y
11) base() <=> y
[edit] Hinweise
Überladung (1) kann verwendet werden, um zwei basic_const_iterator<Iter> Werte zu vergleichen, wenn Iter sentinel_for<Iter> modelliert.
[edit] Beispiel
| Dieser Abschnitt ist unvollständig Grund: kein Beispiel |
[edit] Siehe auch
| |||