C++ Ranges::views::empty, filter, reverse, iota and Ranges::iota_view Introduction














































C++ Ranges::views::empty, filter, reverse, iota and Ranges::iota_view Introduction



In this series of articles on RANGES with C++, today we are going to see libraries of std::ranges::view::empty, std::ranges::view::filter, std::ranges::view::reverse, std::ranges::view::iota, std::ranges::iota_view

____________________________________________________________________________________

INTRODUCTION to RANGES HAS BEEN DONE IN MY FIRST ARTICLE OF RANGES LIBRARY

All the libraries defined below are included in the header <ranges> and <iterator>.

Here we are going to discuss about views and its libraries.


std::ranges::view::empty


It is a  range adaptor that produces a View of no elements of a particular type.



std::ranges::view::filter


It is a range adaptor that represents View of the mentioned sequence without the elements that fail to satisfy a predicate.

std::ranges::view::reverse
It is a range adaptor that represents a view of underlying View with reversed order.

std::ranges::view::iota
It generates a sequence of elements by repeatedly incrementing an initial value and can be both bounded and unbounded (infinite).

std::ranges::iota_view
Ranges iota_view are expression equivalent to view::iota. It has the same effect.

  ------------------------------------------------------

Comments