# std::ranges::elements_view<V,N>::sentinel

From cppreference.com
< cpp‎ | ranges‎ | elements view

template< bool Const > class /*sentinel*/; // exposition only |  | (since C++20)

The return type of `elements_view::end` when the underlying view is not a `common_range`.

The type /*sentinel*/<true> is returned by the const-qualified overload. The type /*sentinel*/<false> is returned by the non-const-qualified overload.

The name of this class template (shown here as /*sentinel*/) is unspecified.

### Data members

Typical implementations of /*sentinel*/ hold only one non-static data member — a sentinel `end_` obtained from (possibly const-qualified) V.

### Member types

Member type | Definition
`Base` (private) | const V if `Const` is true, otherwise V. The name is for exposition only.

### Member functions

(constructor) (C++20) | constructs a sentinel (public member function)
base (C++20) | returns the underlying sentinel (public member function)

### Non-member functions

operator== (C++20) | compares a sentinel with an iterator returned from `elements_view::begin` (function)
operator- (C++20) | computes the distance between a sentinel and an iterator returned from `elements_view::begin` (function)

Retrieved from "https://en.cppreference.com/mwiki/index.php?title=cpp/ranges/elements_view/sentinel&oldid=144280"