Summary
This episode demonstrates how C++20 Ranges provide an elegant solution to the long-standing challenge of string splitting in C++. Jason shows how std::views::split can produce a range of subranges from a string using a delimiter, though these are lazily evaluated and require additional handling for output. The video highlights the improvements coming in C++23, which will add string_view constructor overloads for ranges, making it easier to convert subranges back into string_view objects. Jason also discusses the constexpr capabilities of ranges while noting some limitations due to their lazy evaluation nature.
Related C++ Standard Sections
This episode covers topics found in these sections of the C++ standard:
-
[meta.const.eval]100% match -
[range.split.overview]63% match -
[range.lazy.split.outer.value]63% match -
[range.split]63% match -
[range.lazy.split.overview]62% match -
[range.split.view]60% match -
[range.lazy.split]60% match -
[range.lazy.split.view]59% match -
[ranges.syn]58% match -
[range.as.const.view]58% match - + 3 more related sections