<xstd/bits/bit_functional/bit_equal_to.hpp>, <xstd/bits/bit_functional/bit_not_equal_to.hpp>¶
bit_equal_to, bit_not_equal_to¶
struct bit_equal_to {
using is_transparent = void;
template<class T, class U>
requires requires (const T& x, const U& y) { xstd::ranges::bit_equal(x, y); }
constexpr auto operator()(const T& x, const U& y) const noexcept -> bool;
};
As equal_to<> and not_equal_to<> in [comparisons], with:
- Constraints:
xstd::ranges::bit_equal(x, y)is a valid expression:TandUare of one reading and one width kind, asbit_equaladmits them. The constraint is the call itself, so the two cannot drift. - Returns:
xstd::ranges::bit_equal(x, y), and forbit_not_equal_to,not xstd::ranges::bit_equal(x, y). bit_fixed_set<70>{1, 65}equalsbasic_bit_fixed_set<size_t, uint8_t, 70>{1, 65}, andbit_vectorcompares withbasic_bit_vector<vector<uint8_t>>.bit_array<8>does not compare withbit_vector, norbit_fixed_set<8>withbit_setor withbit_array<8>, andvector<bool>is turned away: a static width never compares with a run-time one, whichbit_hashkeeps apart.