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]

concat_view presents a view that concatenates all the underlying ranges.
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
  • views​::​all(Es...) if Es is a pack with only one element whose type models input_range,
  • 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]