1
0
Fork 0

Codechange: Add parameterless Flip() method to BaseBitSet.

This allows flipping all valid bits.
pull/14292/head
Peter Nelson 2025-03-26 18:48:52 +00:00
parent 4b6d409ee8
commit 98430f99d1
No known key found for this signature in database
GPG Key ID: 8EF8F0A467DF75ED
1 changed files with 10 additions and 0 deletions

View File

@ -108,6 +108,16 @@ public:
return static_cast<Timpl&>(*this); return static_cast<Timpl&>(*this);
} }
/**
* Flip all bits.
* @returns The bit set
*/
inline constexpr Timpl &Flip()
{
this->data ^= Tmask;
return static_cast<Timpl&>(*this);
}
/** /**
* Flip the value-th bit. * Flip the value-th bit.
* @param value Bit to flip. * @param value Bit to flip.