24 Ranges library [ranges]

24.7 Range adaptors [range.adaptors]

24.7.5 Transform view [range.transform]

24.7.5.1 Overview [range.transform.overview]

transform_­view presents a view of an underlying sequence after applying a transformation function to each element.
Example
:
vector<int> is{ 0, 1, 2, 3, 4 };
transform_view squares{is, [](int i) { return i * i; }};
for (int i : squares)
  cout << i << ' '; // prints: 0 1 4 9 16
— end example
 ]