1
0
Fork 0

Codechange: Allow iterating a BaseBitSet.

pull/13588/head
Peter Nelson 2025-02-10 15:43:11 +00:00 committed by Peter Nelson
parent 0af5d5a9e6
commit ca3b5ed6c1
1 changed files with 5 additions and 0 deletions

View File

@ -13,6 +13,8 @@
#ifndef BASE_BITSET_TYPE_HPP
#define BASE_BITSET_TYPE_HPP
#include "bitmath_func.hpp"
/**
* Base for bit set wrapper.
* Allows wrapping strong type values as a bit set. Methods are loosely modelled on std::bitset.
@ -206,6 +208,9 @@ public:
return (this->base() & Tmask) == this->base();
}
auto begin() const { return SetBitIterator<Tvalue_type>(this->data).begin(); }
auto end() const { return SetBitIterator<Tvalue_type>(this->data).end(); }
private:
Tstorage data; ///< Bitmask of values.
};