26
Ranges library
[ranges]
26.3
Range access
[range.access]
26.3.5
ranges::cend
[range.access.cend]
1
#
The name
ranges
::
cend
denotes a customization point object (
[customization.
point.
object]
)
.
Given a subexpression
E
with type
T
, let
t
be an lvalue that denotes the reified object for
E
.
Then:
(1.1)
If
E
is an rvalue and
enable_
borrowed_
range
<
remove_
cv_
t
<
T
>
>
is
false
,
ranges
::
cend
(
E
)
is ill-formed
.
(1.2)
Otherwise, let
U
be
ranges
::
end
(
possibly-const-range
(
t
)
)
.
ranges
::
cend
(
E
)
is expression-equivalent to
const_
sentinel
<
decltype
(
U
)
>
(
U
)
.
2
#
[
Note
1
:
Whenever
ranges
::
cend
(
E
)
is a valid expression, the types
S
and
I
of the expressions
ranges
::
cend
(
E
)
and
ranges
::
cbegin
(
E
)
model
sentinel_
for
<
S, I
>
.
If
S
models
input_
iterator
, then
S
also models
constant-iterator
.
—
end note
]