In this recipe, we will learn how to use C++ Ranges, a new feature set coming with C++20. Ranges provides convenient functions for working with anything that mimics a range of objects or values. For example, 4, 8, 15, 16, 23, 42 is a range of integers. In C++ today, working with ranges can be cumbersome depending on what you are doing. This recipe is important as C++ ranges removes a lot of complexity associated with working with ranges, ensuring that your code is easier to read and maintain over time.
Working with Ranges in C++20
Getting ready
Before beginning, please ensure that all of the technical requirements are met, including installing Ubuntu 19.04 or higher and running the following in a Terminal window:
> sudo...