Released: June 21, 2022
IMPORTANT: This release deprecates
views::group_by
which was
an endless source of confusion.group_by
is replaced with
views::chunk_by
(which, beware, has subtly different semantics,
see below.)
Changes:
- NEW:
views::chunk_by
which, like the oldviews::group_by
it replaces,
splits a range into a range-of-ranges, where adjacent elements satisfy a binary
predicate (#1648). [Note: Whereasviews::group_by
evaluated the predicate
between the current element and the first element in the chunk,views::chunk_by
evaluates the predicate between adjacent elements. -- end note] - NEW:
constexpr
all the algorithms that areconstexpr
in C++20'sstd::ranges
(#1683). - NEW: Fold algorithms from P2322 (#1628), (#1668).
- NEW:
ranges::unformatted_ostream_iterator
(#1586). - NEW: Support for the
build2
build system (#1562). - Implement P2328: relax the constraint on
ranges::join_view
to support joining ranges of prvalue non-view
ranges (#1655). - Improved algorithm for
ranges::linear_distribute
(#1679). - Renamed
safe_subrange_t
toborrowed_subrange_t
(#1542). - Extend
ranges::to
to support conversion to container-of-containers (#1553). views::enumerate
can be aborrowed_view
(#1571).ranges::upper_bound
works in the presence of overloadedoperator&
(#1632).- Input iterators are no longer required to be default-constructible (#1652).
Bugs fixed:
ranges::to<std::map>(v)
does not work (#1700)ranges::reverse_iterator
has the wrongvalue_type
when reversing a proxy
range (#1670).- A post-increment of a
ranges::counted_iterator
wrapping an input iterator with
avoid
-returning post-increment operator isn't incrementing the count (#1664). - Bad assert in
views::drop_last
(#1599). - Read of uninitialized
bool
inviews::cache1
(#1610). ranges::unstable_remove_if
calls predicate on same element twice (#1629).ranges::on(f,g)(x...)
should bef(g(x)...)
instead off(g(x...))
(#1661).- Broken qualification of cmake targets (#1557).
- Various portability and documentation fixes.
Credits: I would like to thank the following people who contributed to this release
(in no particular order): Barry Revzin, @dvirtz, Gonzalo Brito, Johel Ernesto Guerrero
Peña, Joël Lamotte, Doug Roeper, Facundo Tuesca, Vitaly Zaitsev, @23rd, @furkanusta,
Jonathan Haigh, @SmorkalovG, @marehr, Matt Beardsley, Chris Glover, Louis Dionne, Jin
Shang (@js8544), Hui Xie, @huixie90, Robert Maynard, Silver Zachara, @sergegers,
Théo DELRIEU, @LesnyRumcajs, Yehezkel Bernat, Maciej Patro, Klemens Nanni, Thomas
Madlener, and Jason Merrill.
🎉 Special thanks to Barry Revzin for stepping up to be part-time co-maintainer of
range-v3. 🎉