Daily bit(e) of C++ | std::ranges::contains, std::ranges::contains_subrange
Daily bit(e) of C++ #122, The C++23 simplified presence check algorithms: std::ranges::contains, std::ranges::contains_subrange.
C++23 introduced two new algorithms in the ranges namespace.
std::ranges::contains
std::ranges::contains_subrange
These two algorithms do not introduce novel behaviour; instead, they remove the need to translate the results of std::ranges::find
and std::ranges::search
.