26 KiB
Release Notes
\section v0-12-0 Version 0.12.0 "Dude, Where's My Bored Ape?"
Released: June 19, 2022
IMPORTANT: This release deprecates
views::group_bywhich was an endless source of confusion.group_byis replaced withviews::chunk_by(which, beware, has subtly different semantics, see below.)
Changes:
- NEW:
views::chunk_bywhich, like the oldviews::group_byit replaces, splits a range into a range-of-ranges, where adjacent elements satisfy a binary predicate (#1648). [Note: Whereasviews::group_byevaluated the predicate between the current element and the first element in the chunk,views::chunk_byevaluates the predicate between adjacent elements. -- end note] - NEW:
constexprall the algorithms that areconstexprin C++20'sstd::ranges(#1683). - NEW: Fold algorithms from P2322 (#1628), (#1668).
- NEW:
ranges::unformatted_ostream_iterator(#1586). - NEW: Support for the
build2build system (#1562). - Implement P2328: relax the constraint on
ranges::join_viewto support joining ranges of prvalue non-viewranges (#1655). - Improved algorithm for
ranges::linear_distribute(#1679). - Renamed
safe_subrange_ttoborrowed_subrange_t(#1542). - Extend
ranges::toto support conversion to container-of-containers (#1553). views::enumeratecan be aborrowed_view(#1571).ranges::upper_boundworks 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_iteratorhas the wrongvalue_typewhen reversing a proxy range (#1670).- A post-increment of a
ranges::counted_iteratorwrapping 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
boolinviews::cache1(#1610). ranges::unstable_remove_ifcalls 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. 🎉
\section v0-11-0 Version 0.11.0 "Thanks, ISO"
Released: August 6, 2020
IMPORTANT: This release removes the heuristic that tries to guess whether a range type is a "view" (lightweight, non-owning range), in accordance with the C++20. This is a potentially source-breaking change. Code that previously used an rvalue range as the start of a pipeline could stop compiling if the range library is not explicitly told that that range type is a view. To override the new default, please specialize the
ranges::enable_view<R>Boolean variable template.
IMPORTANT: This release removes the implicit conversion from views to containers. To construct a container from an arbitrary range, you must now explicitly use
ranges::to. For example, the following code no longer works:std::vector<int> is = ranges::views::ints(0, 10); // ERROR: no conversionInstead, please write this as:
auto is = ranges::views::ints(0, 10) | ranges::to<std::vector>; // OK
ranges::tolives in header<range/v3/range/conversion.hpp>
IMPORTANT: This release drops support for llvm-3.9.
Changes:
- NEW: A new concepts portability layer that short-circuits atomic constraints
in
requiresclauses for better compile times when emulating concepts. - NEW: Restored support for MSVC in
/std:c++17mode, and for MSVC's default preprocessor. - Remove the implicit conversion from views to containers.
- Rename the following entities to be consistent with C++20's
std::rangessupport:safe_range<R>->borrowed_range<R>enable_safe_range<R>->enable_borrowed_range<R>safe_iterator_t<R>->borrowed_iterator_t<R>safe_subrange_t<R>->borrowed_subrange_t<R>readable_traits<I>->indirectly_readable_traits<I>readable<I>->indirectly_readable<I>writable<I>->indirectly_writable<I>
- Added the following to the
ranges::cpp20namespace:- Algorithm
for_each_n - Algorithm
sample - Class
view_base - Alias
views::all_t
- Algorithm
- Type
__int128is recognized as "integer-like". - Adds concepts
three_way_comparable[_with]when<=>is supported. - Adds concepts
partially_ordered[_with]. - Better conformance with C++20's use of the
boolean-testableconcept. - Support C++20 coroutines.
- Honor CMake's
CMAKE_CXX_STANDARDvariable. - A fix for the cardinality of
views::zip[_with](#1486). - Add
view_interface::data()member function. - Add necessary specializations for
std::basic_common_referenceandstd::common_type. - Numerous workarounds for MSVC.
- Various CMake fixes and improvements.
drop_while_viewis not asized_range.- Added support for Wind River Systems.
- Bug fixes to
views::group_by(#1393). common_[reference|type]ofcommon_[tuple|pair]now yields acommon_[tuple|pair]instead of astd::[tuple|pair](#1422).- Avoid UB when currying an lvalue in some views and actions (#1320).
Credits: I would like to thank the following people who contributed to this release (in no particular order): Christopher Di Bella, @marehr, Casey Carter, Dvir Yitzchaki, Justin Riddell, Johel Ernesto Guerrero Peña, Barry Revzin, Kamlesh Kumar, and Vincas Dargis.
\section v0-10-0 Version 0.10.0 "To Err is Human"
Released: Dec 6, 2019.
IMPORTANT: Before upgrading, please note that several older compiler versions
and build configurations are no longer supported! In particular, MSVC now needs
/std:c++latest.
ALSO: When taking a dependency on the range-v3, meta, or concepts
libraries via CMake, please now use the namespace qualified target names:
range-v3::range-v3range-v3::metarange-v3::concepts
Changes:
- NEW: Rewritten concepts portability layer with simpler macros for better diagnostics.
- NEW: The
views::cache1view caches the most recent value in the range. This can help avoid reevaluation of transformations in complex view pipelines. - NEW:
ranges::containsalgorithm. - NEW:
enable_safe_rangetrait for opting in to the forwarding-range concept. These are ranges whose iterators remain valid even after the range itself has been destroyed; e.g.,std::string_viewandranges::subrange. - The
readableconcept has changed such that types that are not indirectly readable withoperator*(_e.g.,std::optional) no longer satisfy that concept. - Using
views::jointo join a range of xvalue ranges works again. - The following range access primitives no longer accept temporary containers
(i.e., they refuse to return references known to be dangling):
range::frontrange::backrange::atrange::index
views::concatwith a single argument now simply returns its argument.ranges::ostream_iterator<T>now coerces arguments toTbefore inserting them into the wrapped ostream.- Smaller iterators for
views::transformandviews::take_while. actions::splitandactions::split_whennow support partial application and pipelining (#1085).views::group_byand its iterator both get a.base()member to access the underlying range and iterator, respectively.- Improved diagnostics with clang.
- Assorted bug fixes and compiler work-arounds: #284, #491, #499, #871, #1022, #1043, #1081, #1085, #1101, #1116, #1296, #1305, and #1335.
Many thanks to GitHub users @CaseyCarter, @morinmorin, @h-2, @MichaelWJung, @johelegp, @marehr, @alkino, @xuning97, @BRevzin, and @mpusz for their contributions.
\section v0-9-1 Version 0.9.1
Released: Sept 1, 2019.
gcc-9.x portability fixes.
\section v0-9-0 Version 0.9.0 "Std::ranger Things"
Released: Aug 26, 2019.
Bring many interfaces into sync with the C++20 draft.
- NEW: An improved concepts portability layer with macros that use C++20 concepts when the compiler supports them.
- NEW: An improved directory structure that keeps disjoint parts of the library -- iterators, ranges, algorithms, actions, views, functional programming support, and general utilities -- physically separate.
- NEW: A
RANGES_DEEP_STL_INTEGRATIONconfiguration option that makes your STL implementation default to structural conformance to infer iterator category, as in C++20. Applies to libc++, libstdc++, and MSVC's Standard Library. - NEW: A
ranges::cpp20namespace that contains all the functionality of C++20'sstd::rangesnamespace. - All concept names have been given standard_case (renamed from PascalCase) and have been harmonized with the C++20 draft.
- The following range access customization points no longer accept rvalue ranges
by default:
ranges::beginranges::endranges::rbeginranges::rendranges::cbeginranges::cendranges::crbeginranges::crendranges::dataranges::cdata
- Iterators may specify an
iterator_concepttype alias in addition toiterator_category-- either as a nested type or as a member of astd::iterator_traitsspecialization -- to denote conformance to the C++20 iterator concepts as distinct from the C++98 iterator requirements. (See P1037 "Deep Integration of the Ranges TS" for more information.) - The
ranges::value_typetrait has been renamed toreadable_traits. - The
ranges::difference_typetrait has been renamed toincrementable_traits. - The
ranges::iterator_categorytrait has been deprecated. Specializestd::iterator_traitsto non-intrusively specify an iterator's category and (optionally) concept. - Rename the
ranges::viewnamespace toranges::viewsandranges::actiontoranges::actions(with deprecated namespace aliases for migration). - Rename
view::boundedtoviews::common. - Rename
unreachabletounreachable_sentinel_t. - Change
danglingfrom a class template that wraps an iterator to a class that acts as a placeholder for an iterator that would otherwise dangle. - Implement C++20's
subrangeas a view that wraps an iterator/sentinel pair; deprecateiterator_range. - Deprecate implicit conversion from view types to containers; rename
ranges::to_toranges::toand extend it to support converting a range-of-ranges to a container-of-containers. - Deprecate the
ranges::v3inline versioning namespace. - The following views have had minor changes to bring them into conformance with
the C++20 working draft:
join_viewsingle_viewempty_viewsplit_viewreverse_viewall_viewtake_viewiota_view
`iota_view`, in particular, is given a user-defined `difference_type` that avoids integer overflow.
- New names for the iterator and range type aliases:
Old Name New Name value_type_titer_value_treference_titer_reference_tdifference_type_titer_difference_tsize_type_tdeprecated rvalue_reference_titer_rvalue_reference_trange_value_type_trange_value_trange_difference_type_trange_difference_trange_size_type_trange_size_t
\section v0-5-0 Version 0.5.0
Released: Apr 30, 2019.
- NEW: MSVC support, from @CaseyCarter 🎉 (See the docs for the list of supported compilers.)
- NEW:
view::enumerate, from @MikeGitb - NEW:
view::addressof, from @tower120 - NEW:
unstable_remove_ifalgorithm and action, from @tower120 - NEW:
adjacent_remove_ifalgorithm and action, from @cjdb - NEW:
ostream_joiner, from @sv1990 view::drop_whileandview::take_whileget projection support, from @mrpiview::filterandview::remove_ifget projection support, from @mrpiview::uniqueaccepts optional comparison operator, from @tete17action::slicesupports sliding from the end, from @tete17- Support coroutines on MSVC, from @CaseyCarter
- Faster
view::generate_n, from GitHub user @tower120 - Improved aligned new detection for libc++ on iOS, from @mtak-
- Various CMake improvements, from @johelegp
view_adaptorsupportsbasic_iterator-style mixins, from @tower120- Fix
ranges::advancefor random-access iterators forn==0, from @tower120 - Bugs fixed: #755, #759, #942, #946, #952, #975, #978, #986, #996, #1041, #1047, #1088, #1094, #1107, #1129
\section v0-4-0 Version 0.4.0
Released: Oct 18, 2018.
- Minor interface-breaking changes:
single_viewreturns byconst &(see #817).reverse_viewof a non-Sized, non-Bounded RandomAccess range (eg., a null-terminated string) no longer satisfies SizedRange.- The
generateandgenerate_nviews now return the generated values by xvalue reference (T &&) to the value cached within the view (see #905). - Views no longer prefer returning constant iterators when they can; some views have different constant and mutable iterators.
- Enhancements:
- Views can successfully adapt other views that have different constant and mutable iterators.
- The
singleandemptyviews are much closer to the versions as specified in P0896.
- Bug fixes:
- "single_view should not copy the value" #817.
- "Calling back() on strided range does not return the correct last value in range" #901.
- "generate(foo) | take(n) calls foo n+1 times" #819.
- "generate seems broken with move-only return types" #905.
- "Unexpected behavior in generate with return by reference" #807.
- "Inconsistent behaviour of ranges::distance with ranges::view::zip using infinite views." #783.
- "Infinite loop when using ranges::view::cycle with an infinite range" #780.
- "Composing ranges::view::cycle with ranges::view::slice" #778.
- "cartesian_product view, now with moar bugs." #919.
\section v0-3-7 Version 0.3.7
Released: Sept 19, 2018.
- Improved support for clang-cl (thanks to @CaseyCarter).
- Fix for
any_view<T, category::sized | category::input>(see #869). - Fix
iter_moveof aranges::reverse_iterator(see #888). - Fix
move_sentinelcomparisons (see #889). - Avoid ambiguity created by
boost::advanceandstd::advance(see #893).
\section v0-3-6 Version 0.3.6
Released: May 15, 2018.
- NEW:
view::exclusive_scan(thanks to GitHub user @mitsutaka-takeda). - All views get non-
constoverloads of.empty()and.size()(see ericniebler/stl2#793). - Upgrade Conan support for conan 1.0.
subspaninterface tweaks.- Fix bug in
view::split(see this stackoverflow question). - Fix bug in
view::stride(see ericniebler/stl2#805). - Fix
const-correctness problem inview::chunk(see this stackoverflow question). - Replace uses of
ranges::result_ofwithranges::invoke_result. - Fix potential buffer overrun of
view::dropover RandomAccessRanges. - Lots of
view::cartesian_productfixes (see ericniebler/stl2#820, ericniebler/stl2#823). - Work around gcc-8 regression regarding
volatilestd::initializer_lists (see ericniebler/stl2#826). - Fix
const-correctness problem ofview::take.
\section v0-3-5 Version 0.3.5
Released: February 17, 2018.
- Rvalues may satisfy
Writable(see ericniebler/stl2#387). view_interfacegets a bounds-checkingatmethod.chunk_viewworks on Input ranges.- Fix bug in
group_by_view. - Improved concept checks for
partial_sumnumeric algorithm. - Define
ContiguousIteratorconcept andcontiguous_iterator_tagiterator category tag. - Sundry
spanfixes. action::insertavoids interfering withvector's exponentional growth strategy.- Add an experimental
sharedview for views that need container-like scratch space to do their work. - Faster, simpler
reverse_view. - Rework
ranges::reference_wrapperto avoid LWG#2993. - Reworked
any_view, the type-erased view wrapper. equalalgorithm isconstexprin C++14.stride_viewno longer needs anatomicdata member.const-correctdrop_view.adjacent_filter_viewsupports bidirectional iteration.- Massive
view_adaptorcleanup to remove the need for amutabledata member holding the adapted view. - Fix
counting_iteratorpost-increment bug. tail_viewof an empty range is an empty range, not undefined behavior.- Various portability fixes for gcc and clang trunk.
\section v0-3-0 Version 0.3.0
Released: June 30, 2017.
- Input views may now be move-only (from @CaseyCarter)
- Input
any_views are now much more efficient (from @CaseyCarter) - Better support for systems lacking a working
<thread>header (from @CaseyCarter)
\section v0-2-6 Version 0.2.6
Released: June 21, 2017.
- Experimental coroutines with
ranges::experimental::generator(from @CaseyCarter) ranges::optionalnow behaves likestd::optional(from @CaseyCarter)- Extensive bug fixes with Input ranges (from @CaseyCarter)
\section v0-2-5 Version 0.2.5
Released: May 16, 2017.
view::chunkworks on Input ranges (from @CaseyCarter)for_each_nalgorithm (from @khlebnikov)- Portability fixes for MinGW, clang-3.6 and -3.7, and gcc-7; and cmake 3.0
\section v0-2-4 Version 0.2.4
Released: April 12, 2017.
Fix the following bug:
action::stable_sortofvectorbroken on Clang 3.8.1 since ~last Xmas (ericniebler/range-v3#632).
\section v0-2-3 Version 0.2.3
Released: April 4, 2017.
Fix the following bug:
- iterators that return move-only types by value do not satisfy Readable (ericniebler/stl2#399).
\section v0-2-2 Version 0.2.2
Released: March 30, 2017.
New in this release:
view::linear_distribute(from,to,n)- A view ofnelements betweenfromandto, distributed evenly.view::indices(n)- A view of the indices[0,1,2...n-1].view::closed_indices(n)- A view of the indices[0,1,2...n].
This release deprecates view::ints(n) as confusing to new users.
\section v0-2-1 Version 0.2.1
Released: March 22, 2017.
New in this release:
view::cartesian_productaction::reverse
\section v0-2-0 Version 0.2.0
Released: March 13, 2017.
Bring many interfaces into sync with the Ranges TS.
-
Many interfaces are simply renamed. The following table shows the old names and the new. (All names are in the
ranges::v3namespace.)Old Name New Name indirect_swapiter_swapindirect_moveiter_moveiterator_value_tvalue_type_titerator_reference_treference_titerator_difference_tdifference_type_titerator_size_tsize_type_titerator_rvalue_reference_trvalue_reference_titerator_common_reference_titer_common_reference_trange_value_trange_value_type_trange_difference_trange_difference_type_trange_size_trange_size_type_trange_iterator_titerator_trange_sentinel_tsentinel_t -
common_iteratornow requires that its two types (IteratorandSentinel) are different. Usecommon_iterator_t<I, S>to get the old behavior (i.e., if the two types are the same, it is an alias forI; otherwise, it iscommon_iterator<I, S>). -
The following iterator adaptors now work with iterators that return proxies from their postfix increment operator (i.e.,
operator++(int)):common_iteratorcounted_iterator
-
The following customization points are now implemented per the Ranges TS spec and will no longer find the associated unconstrained overload in namespace
std:::ranges::beginranges::endranges::sizeranges::swapranges::iter_swap
(In practice, this has very little effect but it may effect overloading in rare situations.)
-
ranges::is_swappablenow only takes one template parameter. The newranges::is_swappable_with<T, U>tests whetherTandUare swappable.ranges::is_swappable<T>is equivalent toranges::is_swappable_with<T &, T &>. -
The following object concepts have changed to conform with the Ranges TS specification, and approved changes (see P0547):
DestructibleConstructibleDefaultConstructibleMoveConstructibleMoveConstructibleMovableAssignable
-
The
Viewconcept is no longer satisfied by reference types. -
The syntax for defining a concept has changed slightly. See iterator/concepts.hpp for examples.
\section v0-1-1 Version 0.1.1
- Small tweak to
Writableconcept to fix #537.
\section v0-1-0 Version 0.1.0
- March 8, 2017, Begin semantic versioning