From Jason Turner
Watch on YouTube

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.

Resources

Tags