diff --git a/src/core/base_bitset_type.hpp b/src/core/base_bitset_type.hpp index e313c9a2c9..43da1d2983 100644 --- a/src/core/base_bitset_type.hpp +++ b/src/core/base_bitset_type.hpp @@ -52,6 +52,17 @@ public: return static_cast(*this); } + /** + * Set values from another bitset. + * @param other Bitset of values to set. + * @returns The bit set + */ + inline constexpr Timpl &Set(const Timpl &other) + { + this->data |= other.data; + return static_cast(*this); + } + /** * Assign the value-th bit. * @param value Bit to assign to. @@ -74,6 +85,17 @@ public: return static_cast(*this); } + /** + * Reset values from another bitset. + * @param other Bitset of values to reset. + * @returns The bit set + */ + inline constexpr Timpl &Reset(const Timpl &other) + { + this->data &= ~other.data; + return static_cast(*this); + } + /** * Flip the value-th bit. * @param value Bit to flip. @@ -88,6 +110,17 @@ public: } } + /** + * Flip values from another bitset. + * @param other Bitset of values to flip. + * @returns The bit set + */ + inline constexpr Timpl &Flip(const Timpl &other) + { + this->data ^= other.data; + return static_cast(*this); + } + /** * Test if the value-th bit is set. * @param value Bit to check.