26
Ranges library
[ranges]
26.7
Range adaptors
[range.adaptors]
26.7.18
Concat view
[range.concat]
26.7.18.1
Overview
[range.concat.overview]
1
#
concat_
view
presents a view that concatenates all the underlying ranges
.
2
#
The name
views
::
concat
denotes a customization point object (
[customization.
point.
object]
)
.
Given a pack of subexpressions
Es
.
.
.
, the expression
views
::
concat
(
Es
.
.
.
)
is expression-equivalent to
(2.1)
views
::
all
(
Es
.
.
.
)
if
Es
is a pack with only one element whose type models
input_
range
,
(2.2)
otherwise,
concat_
view
(
Es
.
.
.
)
.
[
Example
1
:
vector
<
int
>
v1
{
1
,
2
,
3
}
, v2
{
4
,
5
}
, v3
{
}
; array a
{
6
,
7
,
8
}
;
auto
s
=
views
::
single
(
9
)
;
for
(
auto
&
&
i
:
views
::
concat
(
v1, v2, v3, a, s
)
)
{
print
(
"{} "
, i
)
;
// prints
1 2 3 4 5 6 7 8 9
}
—
end example
]