#ifndef LIBDPF_TEST_TESTS_HELPERS_DOMAIN_WALK_HPP__ #define LIBDPF_TEST_TESTS_HELPERS_DOMAIN_WALK_HPP__ // eval_interval / eval_full emit points in integer order of the input bits // (the same order as operator++ for ordinary integers). xor_wrapper::operator++ // is characteristic-2 addition, XOR 1, so it does not walk that domain. template InputT next_domain_point(InputT cur) { if constexpr (dpf::utils::has_characteristic_two_v) { using narrow = dpf::utils::integral_type_from_bitlength_t>; auto bits = static_cast(dpf::utils::to_integral_type{}(cur)); bits = static_cast(bits + narrow{1}); return dpf::utils::make_from_integral_value{}(bits); } else { ++cur; return cur; } } #endif // LIBDPF_TEST_TESTS_HELPERS_DOMAIN_WALK_HPP__