MCPcopy Create free account
hub / github.com/SmingHub/Sming / BitRef

Class BitRef

Sming/Core/Data/BitSet.h:54–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 static_assert(size_ <= (sizeof(S) * 8), "BitSet has too many elements for storage type");
53
54 class BitRef
55 {
56 public:
57 operator bool() const
58 {
59 return bitset.test(e);
60 }
61
62 BitRef& operator=(bool b)
63 {
64 bitset.set(e, b);
65 return *this;
66 }
67
68 private:
69 friend BitSet;
70 BitRef(BitSet& bitset, E e) : bitset(bitset), e(e)
71 {
72 }
73
74 BitSet& bitset;
75 E e;
76 };
77
78 /**
79 * @brief Construct empty set

Callers

nothing calls this directly

Calls 2

testMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected