ericniebler / range-v3

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

adds `ranges::contains_subrange` #1675

Closed cjdb closed 2 years ago

cjdb commented 2 years ago

P2302 proposes an find-based contains (called contains) and a search-based contains (called contains_subrange). The former is used to determine if an element exists in a range, while the latter is used to determine whether or not a needle range is a subrange of a haystack range.

JeffGarland commented 2 years ago

Given that LWG has adopted this paper for C++23 it would be nice if this could be added.