std::basic_...ator==,,>=,(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

πŸŽ€ 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 for Iter πŸ’…
  • y β€” a value to compare with πŸ¦‹

πŸ’– Return value πŸ’–

  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

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