std::move_sentinel(3)

πŸ’… std::move_sentinel πŸ’…

okay so welcome to the C++ Standard Libary page for std::move_sentinel, section 3, bestie πŸ’– she's a whole sentinel adaptor and she's about to make sense, no cap.

πŸŽ€ NAME πŸŽ€

std::move_sentinel β€” std::move_sentinel.

✨ Synopsis ✨

Defined in header <iterator>:

template< std::semiregular S >  (since C++20)
class move_sentinel;

std::move_sentinel is a sentinel adaptor used for denoting ranges together with std::move_iterator.

πŸ¦‹ Template parameters πŸ¦‹

  • S β€” the type of underlying sentinel.

πŸ’œ Member functions πŸ’œ

  • constructor β€” constructs a new move_sentinel. (C++20) (public member function)
  • operator= β€” assigns the contents of one move_sentinel to another. (C++20) (public member function)
  • base β€” return a copy of the underlying sentinel. (C++20) (public member function)

🌈 Member objects 🌈

  • Member name: last (private member object) β€” Definition: underlying sentinel, the name is for exposition only.

πŸ”₯ Non-member functions πŸ”₯

Note, bestie: these functions are hidden friends of std::move_iterator and invisible to ordinary unqualified or qualified lookup. iykyk.
  • operator==(std::move_sentinel) (C++20) β€” compares the underlying iterator and the underlying sentinel (function template)
  • operator-(std::move_sentinel) (C++20) β€” computes the distance between the underlying iterator and the underlying sentinel (function template)

πŸ“ Example πŸ“

This section is incomplete Reason: no example

🌸 See also 🌸

  • move_iterator (C++11) β€” iterator adaptor which dereferences to an rvalue (class template)

🧚 Category 🧚

  • Todo no example

kisses and slay, your bestie at http://cppreference.com πŸ’– page date 2024.06.10, manual tag std::move_sentinel(3), and that's the whole vibe. mwah 🫢

πŸ“¦ where this page comes from