The Concepts Ranges and Views

Get a quick refresher on the concepts, 'ranges' and 'views'.

I already presented the concepts ranges and views when discussing concepts. Consequently, here’s a brief refresher:

  • range: A range is a group of items that you can iterate over. It provides a begin iterator and an end sentinel. The containers of the STL are ranges.

  • view: A view is something that you apply on a range and performs some operation. A view does not own data, and its time complexity to copy, move, or assign is constant.

Get hands-on with 1200+ tech skills courses.