Eventually, I have decided to try C++20 😀
Let’s start with std::span!
What is a Span?
Here is the definition given by cppreference:
The class template
spandescribes an object that can refer to a contiguous sequence of objects with the first element of the sequence at position zero.
Spans are sometimes called “views” because they don’t own the sequence of objects.
If you are familiar with std::string_view from C++17, then you can easily understand the concept of spans. std::string_views are somehow spans on sequences of characters. The main difference is that spans can modify the objects while string views can’t modify the characters.