25
Ranges library
[ranges]
25.3
Range access
[range.access]
25.3.4
ranges::cbegin
[range.access.cbegin]
1
#
The name
ranges
::
cbegin
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
::
cbegin
(
E
)
is ill-formed
.
(1.2)
Otherwise, let
U
be
ranges
::
begin
(
possibly-const-range
(
t
)
)
.
ranges
::
cbegin
(
E
)
is expression-equivalent to
const_
iterator
<
decltype
(
U
)
>
(
U
)
.
2
#
[
Note
1
:
Whenever
ranges
::
cbegin
(
E
)
is a valid expression, its type models
input_
or_
output_
iterator
and
constant-iterator
.
—
end note
]