Daily bit(e) of C++ | std::bitset
Daily bit(e) of C++ ♻️47, The container for bit-level storage: std::bitset.
The std::bitset is a statically sized container for storing bits.
The container offers bit-level access, boolean reductions (all, any, none), bitwise operations (AND, OR, XOR, NOT) with bitsets of the same size, bitshifts and state manipulations (set, reset, flip).
Since C++23, std::bitset is fully constexpr.