44 std::reference_wrapper<T> mMask;
53 BitProxy(T& mask, uint index) : mMask(mask), mIndex(index) {}
55 operator bool()
const {
return mMask.get() & (1 << mIndex); }
57 void operator=(
bool bit)
59 mMask.get() = (mMask.get() & ~(1 << mIndex)) | (bit << mIndex);
64 mMask.get() |= (bit << mIndex);
70 mMask.get() &= ~(bit << mIndex);
76 mMask.get() ^= (bit << mIndex);
BitProxy(T &mask, uint index)
Constructs the BitProxy with the given mask and index.
Definition bit_proxy.h:53