ericniebler / range-v3

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

Added views::merge view. Similar to set_union #1781

Open roibarkan opened 1 year ago

roibarkan commented 1 year ago

As part of C++Now's "library in a week" initiative, I've been looking into improving the support of sorted views in the ranges library. A key missing piece in my opinion is a range-adapter for the merge algorithm. Ideally (and somewhat more meaningful than the other set algorithms) - the merge algorithm can benefit from an ability to take more than 2 input ranges and merge them. More information: https://docs.google.com/presentation/d/1Wiz6fr_6RMnf7hvuf3EilZV-cU5Z9eMJW0rb8Zyq274/preview

This pull request simply adds merge() as a two-input view, similar to the rest of the set-operation views in ranges-v3.

I plan to work on adding this algorithm to boost.algorithm as well, enhance it to support multiple inputs, and am considering proposing it for standardization.

roibarkan commented 1 year ago

Can you try to rerun after having dealt with the github actions issue? Do I need to somehow update the pull request to be rebased on top of the github actions fixes?