From Jason Turner

[range.access.cend]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmpo3vvv_ch/{from.md → to.md} +10 -6
tmp/tmpo3vvv_ch/{from.md → to.md} RENAMED
@@ -1,13 +1,17 @@
1
  ### `ranges::cend` <a id="range.access.cend">[[range.access.cend]]</a>
2
 
3
  The name `ranges::cend` denotes a customization point object
4
- [[customization.point.object]]. The expression `ranges::cend(E)` for a
5
- subexpression `E` of type `T` is expression-equivalent to:
6
 
7
- - `ranges::end(static_cast<const T&>(E))` if `E` is an lvalue.
8
- - Otherwise, `ranges::end(static_cast<const T&&>(E))`.
 
 
 
9
 
10
  [*Note 1*: Whenever `ranges::cend(E)` is a valid expression, the types
11
- `S` and `I` of `ranges::cend(E)` and `ranges::cbegin(E)` model
12
- `sentinel_for<S, I>`. *end note*]
 
13
 
 
1
  ### `ranges::cend` <a id="range.access.cend">[[range.access.cend]]</a>
2
 
3
  The name `ranges::cend` denotes a customization point object
4
+ [[customization.point.object]]. Given a subexpression `E` with type `T`,
5
+ let `t` be an lvalue that denotes the reified object for `E`. Then:
6
 
7
+ - If `E` is an rvalue and `enable_borrowed_range<remove_cv_t<T>>` is
8
+ `false`, `ranges::cend(E)` is ill-formed.
9
+ - Otherwise, let `U` be `ranges::end(possibly-const-range(t))`.
10
+ `ranges::cend(E)` is expression-equivalent to
11
+ `const_sentinel<decltype(U)>(U)`.
12
 
13
  [*Note 1*: Whenever `ranges::cend(E)` is a valid expression, the types
14
+ `S` and `I` of the expressions `ranges::cend(E)` and `ranges::cbegin(E)`
15
+ model `sentinel_for<S, I>`. If `S` models `input_iterator`, then `S`
16
+ also models *`constant-iterator`*. — *end note*]
17