export module Core.BitArray; import Core.Types; export namespace Core { class BitArray final { u64 length : 56; u64 bits : 8; u64* data; public: BitArray(); BitArray(const BitArray& other); BitArray(BitArray&& other) noexcept; ~BitArray(); BitArray& operator=(BitArray other) noexcept; BitArray& set(size_t index, u64 value); u64 get(size_t index) const; size_t getLength() const; size_t getBits() const; size_t getInternalByteSize() const; i64 select(size_t index) const; void resize(size_t newLength, size_t newBits); void fill(u64 value); size_t toString(char* s, size_t n) const; void swap(BitArray& other); }; static_assert(sizeof(BitArray) == 16, "invalid bit array size"); }