Many optimizations, bug fixes, and new features. With this version, the popular "calendar" showcase for range libraries is supported (see ./test/calendar.cpp for more).
- ChainRange does not require the output type to be default-constructible.
Many optimizations, bug fixes, and new features. With this version, the popular "calendar" showcase for range libraries is supported (see ./test/calendar.cpp for more).
- Algorithms added:
chain()
cycle()
flatten()
for_each()
group_adjacent_by()
in_groups_of_exactly()
in_groups_of()
null_sink()
padded()
tee()
zip_longest()
- Overload resolution for
as_input_range()
was very confusing. This has been cleaned up. - Some operations that were expected to be idempotent were not (#1).
- Combinators now support non-default-constructible value types, unless the output explicitly requires it (#7).
- Fix
first()
aftersort()
(#8). sort()
can now be constructed with comparison predicates taking more than one constructor argument.sort()
/min()
/max()
support non-default-constructible and non-copyable predicates.
- When compilers support it,
__builtin_expect
is utilized in inner loops to aid code layout. - Idempotency is now only ensured when the input isn't already idempotent.
- Fine-tuning of many internal loops to avoid unnecessary branches.
- Where possible, the "empty base class" optimization is used. This mostly applies to combinators
that take a standard comparison predicate (
std::less
,std::equal_to
, etc.). group_adjacent_by()
no longer requires internal temporary storage in a vector (#6).
- Grouping combinators now produce subranges instead of
std::array
s orstd::vector
s, eliminating the need to allocate temporary internal storage. - Added a benchmark suite using Google Benchmark.
- Cleanup of internal naming conventions.
T::is_finite
is no longer required for input ranges (defaults tofalse
if missing).min()
andmax()
can now operate with a custom comparison function.
- René Kijewski
- Jules Ricou
- Simon Ask Ulsnes
Bug fixes and feature enhancements. Thanks for the valuable feedback from /r/cpp!
- Added
enumerate(...)
as an alias forzip(seq(), ...)
. - Added
reverse()
sink, which reverses the order of the input. - Renamed
first_n()
totake()
(keepingfirst_n()
as an alias). - Renamed
fill()
torepeat()
(keepingfill()
as an alias). - Renamed
fill_n()
torepeat_n()
(keepingfill_n()
as an alias).
- Fixed a bug where
zip(...)
would not explicitly convert its inputs to ranges, meaning standard containers could not be used directly. - Fixed a bug where
zip(...)
would produce tuples containing expired references.
- Added MIT license (See ./LICENSE).
- Updated README, including more examples.