47 static constexpr size_t BIT_SIZE =
sizeof(T) * 8;
48 static constexpr size_t ARRAY_SIZE = (N + BIT_SIZE - 1) / BIT_SIZE;
50 using container_type = std::array<T, N>;
51 using iterator =
typename container_type::iterator;
54 PONCA_MULTIARCH BitSet() =
default;
59 PONCA_MULTIARCH
void flip(
int i);
67 PONCA_MULTIARCH
bool erase(
int value);
81 PONCA_MULTIARCH std::pair<iterator, bool>
insert(
const int& value);
88 PONCA_MULTIARCH [[nodiscard]]
bool contains(
int value)
const;
91 PONCA_MULTIARCH
void clear();
93 PONCA_MULTIARCH [[nodiscard]] iterator begin();
95 PONCA_MULTIARCH [[nodiscard]] iterator end();