ericniebler / range-v3

Range library for C++14/17/20, basis for C++20's std::ranges
Other
4.11k stars 440 forks source link

make group_by evaluate the predicate on adjacent elements #1647

Closed huixie90 closed 3 years ago

huixie90 commented 3 years ago

as mentioned in http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2214r0.html#the-group_by-family

to be consistent with Haskell/Elixir/D and make it more familiar and useful, I've updated the group_by view to evaluate the predicate on adjacent elements