#pragma once #include #include #include #include #include #include #include #include #include #include #include "../../utils/popcount.hpp" #include "../../utils/countr_zero.hpp" namespace detail { /** * @brief Dynamic bitset. * * @details Data structure used to store a Vector of bits and apply binary operations to it. The * bits are stored in an optimized way in an underling block type. It is highly inspired * by std\::bitset but with a run-time changeable size. * * Preconditions are checked with @a assert but no exception will be thrown if one is * violated (as with std\::bitset). * * @remark It is not a Container as it does not provide iterators because of the reference proxy * class used to access the bits. * * @tparam Vector Vector type to use for storing the blocks, must meet the standard * @tparam Block Block type to use for storing the bits, must be an unsigned integral type * * @since 1.0.0 */ template