24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.6 Take view [range.take]

24.7.6.1 Overview [range.take.overview]

take_­view produces a view of the first N elements from another view, or all the elements if the adapted view contains fewer than N.
Example
:
vector<int> is{0,1,2,3,4,5,6,7,8,9};
take_view few{is, 5};
for (int i : few)
  cout << i << ' '; // prints: 0 1 2 3 4
— end example
 ]