<xstd/bits/bit_algorithm/bit_includes.hpp>, <xstd/bits/bit_algorithm/bit_intersects.hpp>, <xstd/bits/bit_algorithm/bit_disjoint.hpp>¶
bit_includes, bit_intersects, bit_disjoint¶
As ranges::includes in [includes], and as whether ranges::set_intersection
in [set.intersection] would write a key, or none, with:
- Constraints:
Sis a set of ours, a view included. The second parameter isconst type_identity_t<S>&, soSdeduces froms1alone ands2converts to it: a flag set takes a flag second,bit_includes(perms, fs::perms::owner_read), andbit_fixed_set<8>withbit_fixed_set<9>is turned away. - Returns:
bit_includes: whether every key ofs2is a key ofs1, asranges::includes(s1, s2, s1.key_comp());bit_intersects: whether some key is a key of both;bit_disjoint:not bit_intersects(s1, s2).
- Complexity: O(
K), whereKis the number of blocks of the wider. The blocks both storages hold are compared pairwise, andbit_includesalso asks whethers2holds a key in the blocks aboves1's. A width of zero fixed in the type is answered without a block:trueforbit_includes,falseforbit_intersects. - They answer at any two run-time widths.
- Remarks:
xis a subset ofywherebit_includes(y, x), and a proper one wherenot bit_includes(x, y)as well; every other relation between two sets is spelled from these three.