From ca3b5ed6c1ffcf0e4d9b117546af855ef9929a40 Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 10 Feb 2025 15:43:11 +0000 Subject: [PATCH] Codechange: Allow iterating a BaseBitSet. --- src/core/base_bitset_type.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/base_bitset_type.hpp b/src/core/base_bitset_type.hpp index 43da1d2983..aaea935658 100644 --- a/src/core/base_bitset_type.hpp +++ b/src/core/base_bitset_type.hpp @@ -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(this->data).begin(); } + auto end() const { return SetBitIterator(this->data).end(); } + private: Tstorage data; ///< Bitmask of values. };