Daily bit(e) of C++ | std::binary_search
Daily bit(e) of C++ #225, The binary search presence check algorithm for ordered ranges: std::binary_search.
The std::binary_search is a presence-check algorithm that operates on at least partially ordered ranges (in regards to the searched-for value) and provides O(logn) complexity if the range models at least random-access iteration.
The algorithm does have a range variant and supports constexpr (both since C++20); however, as might be expected, it does not have a parallel variant.