[range.access.cend]

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

## 25.3 Range access [[range.access]](range.access#cend)

### 25.3.5 ranges​::​cend [range.access.cend]

[1](#1)

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

The name ranges​::​cend denotes a customization point
object ([[customization.point.object]](customization.point.object "16.3.3.3.5 Customization Point Object types"))[.](#1.sentence-1)

Given a subexpression E with type T,
let t be an lvalue that denotes the reified object for E[.](#1.sentence-2)

Then:

- [(1.1)](#1.1)

  If E is an rvalue andenable_borrowed_range<remove_cv_t<T>> is false,ranges​::​cend(E) is ill-formed[.](#1.1.sentence-1)

- [(1.2)](#1.2)

  Otherwise,
let U be ranges​::​end(*possibly-const-range*(t))[.](#1.2.sentence-1)
  ranges​::​cend(E) is expression-equivalent toconst_sentinel<decltype(U)>(U)[.](#1.2.sentence-2)

[2](#2)

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

[*Note [1](#note-1)*:

Whenever ranges​::​cend(E) is a valid expression,
the types S and I of the expressionsranges​::​cend(E) and ranges​::​cbegin(E) model [sentinel_for](iterator.concept.sentinel#concept:sentinel_for "24.3.4.7 Concept sentinel_­for [iterator.concept.sentinel]")<S, I>[.](#2.sentence-1)

If S models [input_iterator](iterator.concept.input#concept:input_iterator "24.3.4.9 Concept input_­iterator [iterator.concept.input]"),
then S also models *constant-iterator*[.](#2.sentence-2)

â *end note*]
