Daily bit(e) of C++ | std::views::chunk_by
Daily bit(e) of C++ ♻️89, Splitting a range into chunks based on a predicate using std::views::chunk_by.
The C++23 std::views::chunk_by is a view similar to C++20 std::views::split; however, unlike split, it operates using a binary predicate.
A new chunk will be started between the two tested elements when the predicate returns false.