< cpp‎ | iterator
Iterator library
Iterator concepts
Iterator primitives
Iterator adaptors
Stream iterators
Iterator customization points
Iterator operations
Range access
Defined in header <iterator>
template< std::semiregular S >
class move_sentinel;
(since C++20)

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


[edit] Template parameters

S - the type of underlying sentinel

[edit] Member functions

constructs a new move_sentinel
(public member function)
assigns the contents of one move_sentinel to another
(public member function)
return a copy of the underlying sentinel
(public member function)

[edit] Member objects

Member name Definition
last (private member object) underlying sentinel, the name is for exposition only

[edit] Non-member functions

Notes: These functions are friends of std::move_iterator and invisible to ordinary unqualified or qualified lookup.

compares the underlying iterator and the underlying sentinel
(function template) [edit]
computes the distance between the underlying iterator and the underlying sentinel
(function template) [edit]

[edit] Example

[edit] See also

iterator adaptor which dereferences to an rvalue reference
(class template) [edit]