24
Ranges library
[ranges]
24.6
Range factories
[range.factories]
24.6.3
Single view
[range.single]
24.6.3.1
Overview
[range.single.overview]
1
#
single_view
produces a
view
that contains exactly one element of a specified value
.
2
#
The name
views
::
single
denotes a customization point object (
[customization.
point.
object]
)
.
Given a subexpression
E
, the expression
views
::
single
(
E
)
is expression-equivalent to
single_view
{
E
}
.
3
#
[
Example
1
:
single_view s
{
4
}
;
for
(
int
i
:
s
)
cout
<
<
i;
// prints
4
—
end example
]