std::basic_...ator==,,>=,(3)
π NAME π
okay bestie, this page is from the C++ Standard Libary manual and itβs serving std::basic_...ator==,,>=,(3) energy β¨
The NAME block is literally:
std::basic_const_iterator::operator==,,>=, -
std::basic_const_iterator::operator==,,>=,
chaotic punctuation? yes. iconic? also yes ππ
β¨ Synopsis β¨
okay so this page is all about comparison operators for basic_const_iterator, and the overloads are numbered (1) through (11), all since C++23 π«Ά
Equality comparison
template< std::sentinel_for<Iter> S > (1)
(since C++23)
constexpr bool operator==( const S& s ) const;
Relational comparisons between two basic_const_iterators
constexpr bool operator<( const basic_const_iterator& y ) const (2)
(since C++23)
requires std::random_access_iterator<Iter>;
constexpr bool operator>( const basic_const_iterator& y ) const (3)
(since C++23)
requires std::random_access_iterator<Iter>;
constexpr bool operator<=( const basic_const_iterator& y ) const (4)
(since C++23)
requires std::random_access_iterator<Iter>;
constexpr bool operator>=( const basic_const_iterator& y ) const (5)
(since C++23)
requires std::random_access_iterator<Iter>;
constexpr auto operator<=>( const basic_const_iterator& y ) const
requires std::random_access_iterator<Iter> && (6)
(since C++23)
std::three_way_comparable<Iter>;
Relational comparisons between basic_const_iterator and another
type
template< /*different-from*/<basic_const_iterator> I >
constexpr bool operator<( const I& y ) const (7)
(since C++23)
requires std::random_access_iterator<Iter> &&
std::totally_ordered_with<Iter, I>;
template< /*different-from*/<basic_const_iterator> I >
constexpr bool operator>( const I& y ) const (8)
(since C++23)
requires std::random_access_iterator<Iter> &&
std::totally_ordered_with<Iter, I>;
template< /*different-from*/<basic_const_iterator> I >
constexpr bool operator<=( const I& y ) const (9)
(since C++23)
requires std::random_access_iterator<Iter> &&
std::totally_ordered_with<Iter, I>;
template< /*different-from*/<basic_const_iterator> I >
constexpr bool operator>=( const I& y ) const
(10) (since C++23)
requires std::random_access_iterator<Iter> &&
std::totally_ordered_with<Iter, I>;
template< /*different-from*/<basic_const_iterator> I >
constexpr auto operator<=>( const I& y ) const
requires std::random_access_iterator<Iter> &&
(11) (since C++23)
std::totally_ordered_with<Iter, I> &&
std::three_way_comparable_with<Iter, I>;
Then the page says: Compares a basic_const_iterator with another value. π
And the != operator is synthesized from operator== β no cap, thatβs what it says π«Ά
Also: I satisfies /*different-from*/<basic_const_iterator> if std::same_as<I, basic_const_iterator<Iter>> is false. periodt β¨
πΈ Parameters πΈ
sβ a sentinel forIterπyβ a value to compare with π¦
π Return value π
base() == sbase() < y.base()base() > y.base()base() <= y.base()base() >= y.base()base() <=> y.base()base() < ybase() > ybase() <= ybase() >= ybase() <=> y
literally the whole little return-value menu, and yes bestie, we keep all eleven πβ¨
π¦ Notes π¦
Overload (1) can be used to compare two basic_const_iterator<Iter> values if Iter models sentinel_for<Iter>. thatβs the note. lowkey important, highkey cute π«Ά
π Example π
This section is incomplete
Reason: no example
not me staring at an incomplete example section ππ the page says it itself, okay?
π See also π
This section is incomplete
yup. thatβs the whole See also vibe. incomplete and unbothered πΈ
π Categories π
- Todo no example
- Todo without reason
made with love from http://cppreference.com, dated 2024.06.10, for the std::basic_...ator==,,>=,(3) page β slay, bye bestie π
ππ
π¦ where this page comes from
- nixpkgs unstable: stdman 2024.07.05
- opensuse-leap 16.0: stdman 2024.07.05-bp160.1.9 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms