0Pricing
C++ Academy · Lesson

C++20 Ranges Library Introduction

Use the std::ranges algorithms that take ranges instead of iterator pairs.

Why Ranges?

Traditional STL takes iterator pairs (v.begin(), v.end()). C++20 ranges take a single range value and add composability.

Including Ranges

Include <ranges>. The namespaces are std::ranges for algorithms and std::views for lazy views.

#include <ranges>
#include <algorithm>

All lessons in this course

  1. Iterator Categories input forward bidirectional random
  2. Common Iterator Patterns begin end advance
  3. C++20 Ranges Library Introduction
  4. Range Adaptors views::filter transform take
← Back to C++ Academy