Namespaces
Variants
Views
Actions

std::move_sentinel

From cppreference.com
< cpp‎ | iterator
Revision as of 07:46, 11 December 2023 by Andreas Krug (Talk | contribs)

 
 
Iterator library
Iterator concepts
Iterator primitives
Algorithm concepts and utilities
Indirect callable concepts
Common algorithm requirements
(C++20)
(C++20)
(C++20)
Utilities
(C++20)
Iterator adaptors
Range access
(C++11)(C++14)
(C++14)(C++14)  
(C++11)(C++14)
(C++14)(C++14)  
(C++17)(C++20)
(C++17)
(C++17)
 
 
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.

Contents

Template parameters

S - the type of underlying sentinel

Member functions

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

Member objects

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

Non-member functions

Notes: These functions are hidden 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]

Example

See also

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