#ranges
3 posts tagged #ranges.
views::concat iterates several containers as one range
C++26 adds std::views::concat, a view that presents several ranges as a single sequence without copying any of them. The containers can be different types holding the same elements, the result composes with every other adaptor, and GCC 16.1 ships it today.
Four range views headed for the standard library
The 2026-07 mailing adds a concentrated wave of range adaptors: views::unique for adjacent duplicates, views::take_last and views::drop_last for tail slicing, and views::cycle for endless repetition. None ship yet, so the demo is what you write today to get the same results, which is exactly the boilerplate each proposal collapses into one named view.
Iterating matches, and a manual that has fallen behind
search_all, split and tokenize cover scanning, separating and lexing, and the difference between the first and the last one decides which you want. The documentation still teaches ctre::range, which the compiler now reports as deprecated, so this episode is written against the header.