[range.cache.latest.sentinel]

# 25 Ranges library [[ranges]](./#ranges)

## 25.7 Range adaptors [[range.adaptors]](range.adaptors#range.cache.latest.sentinel)

### 25.7.34 Cache latest view [[range.cache.latest]](range.cache.latest#sentinel)

#### 25.7.34.4 Class cache_latest_view​::​*sentinel* [range.cache.latest.sentinel]

[ð](#lib:cache_latest_view::sentinel)

namespace std::ranges {template<[input_range](range.refinements#concept:input_range "25.4.6 Other range refinements [range.refinements]") V>requires [view](range.view#concept:view "25.4.5 Views [range.view]")<V>class cache_latest_view<V>::*sentinel* { sentinel_t<V> *end_* = sentinel_t<V>(); // *exposition only*constexpr explicit *sentinel*(cache_latest_view& parent); // *exposition only*public:*sentinel*() = default; constexpr sentinel_t<V> base() const; friend constexpr bool operator==(const *iterator*& x, const *sentinel*& y); friend constexpr range_difference_t<V> operator-(const *iterator*& x, const *sentinel*& y)requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>; friend constexpr range_difference_t<V> operator-(const *sentinel*& x, const *iterator*& y)requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>; };}

[ð](#lib:cache_latest_view::sentinel,constructor)

`constexpr explicit sentinel(cache_latest_view& parent);
`

[1](#1)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L17664)

*Effects*: Initializes *end_* with ranges​::​end(parent.*base_*)[.](#1.sentence-1)

[ð](#lib:base,cache_latest_view::sentinel)

`constexpr sentinel_t<V> base() const;
`

[2](#2)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L17675)

*Returns*: *end_*[.](#2.sentence-1)

[ð](#lib:operator==,cache_latest_view::iterator)

`friend constexpr bool operator==(const iterator& x, const sentinel& y);
`

[3](#3)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L17687)

*Returns*: x.*current_* == y.*end_*[.](#3.sentence-1)

[ð](#lib:operator-,cache_latest_view::iterator)

`friend constexpr range_difference_t<V> operator-(const iterator& x, const sentinel& y)
  requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>;
`

[4](#4)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L17700)

*Returns*: x.*current_* - y.*end_*[.](#4.sentence-1)

[ð](#lib:operator-,cache_latest_view::iterator_)

`friend constexpr range_difference_t<V> operator-(const sentinel& x, const iterator& y)
  requires [sized_sentinel_for](iterator.concept.sizedsentinel#concept:sized_sentinel_for "24.3.4.8 Concept sized_­sentinel_­for [iterator.concept.sizedsentinel]")<sentinel_t<V>, iterator_t<V>>;
`

[5](#5)

[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/ranges.tex#L17713)

*Returns*: x.*end_* - y.*current_*[.](#5.sentence-1)
