hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

8.9K
active users

Šimon Tóth

The std::binary_search is a presence-check algorithm that operates on at least partially ordered ranges 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.

Compiler Explorer link: compiler-explorer.com/z/dzPPef