Tests whether the bit at position pos is set.
| 133 | |
| 134 | /// Tests whether the bit at position pos is set. |
| 135 | bool test(fl::u32 pos) const FL_NOEXCEPT { |
| 136 | if (pos < N) { |
| 137 | const fl::u32 idx = pos / bits_per_block; |
| 138 | const fl::u32 off = pos % bits_per_block; |
| 139 | return (_blocks[idx] >> off) & 1; |
| 140 | } |
| 141 | return false; |
| 142 | } |
| 143 | |
| 144 | /// Returns the value of the bit at position pos. |
| 145 | bool operator[](fl::u32 pos) const FL_NOEXCEPT { return test(pos); } |
no outgoing calls
no test coverage detected