Lazy Evaluation
Understand the use of 'std::views::iota' with examples.
We'll cover the following
std::views::iota
is a range factory for creating a sequence of elements by successively incrementing an initial value. This sequence can be finite or infinite.
Filling vector
with views::iota
The following program fills a std::vector
with int
’s, starting with .
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy