[util] Add util::bitset::set(i, val)

Allow for easier callsite code instead of having to switch calling
set(i) vs clear(i) - now set(i, boolean) is an option.
This commit is contained in:
Justin C. Miller
2024-08-10 23:33:26 -07:00
parent fca570a163
commit e345cdd1a7

View File

@@ -51,6 +51,14 @@ public:
return *this;
}
template <typename T>
__attribute__ ((always_inline))
inline bitset & set(T i, bool value) {
if (value) set(i);
else clear(i);
return *this;
}
template <typename T>
__attribute__ ((always_inline))
inline bitset & clear(T i) {