Scroll to navigation

std::move_sentinel(3) C++ Standard Libary std::move_sentinel(3)

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
(public member function) operator= assigns the contents of one move_sentinel to another
(public member function) base return a copy of the underlying sentinel
(public member function)

Member objects

Member name Definition last (private) underlying sentinel
(exposition-only member object*)

Non-member functions

operator==(std::move_sentinel) compares the underlying iterator and the underlying (C++20) sentinel
(function template) operator-(std::move_sentinel) computes the distance between the underlying iterator and (C++20) the underlying sentinel
(function template)

Example


This section is incomplete
Reason: no example

See also

move_iterator iterator adaptor which dereferences to an rvalue (C++11) (class template)

2026.11.10 http://cppreference.com