Core/Bitset: Add bit shifting functions
Former-commit-id: a5d9aa0da769a1f5b70e5db8eed5c370e1e9b076 [formerly c8338571cedad83c557ffa9210f8e11a928157f2] [formerly 47e36d22755f77c878f5277a99f61388f096a449 [formerly 12f27f9470c490160deb869f83736c000bb18d93]] Former-commit-id: bc971c681a184ac7d340fa1d5b053f2e4a8cd156 [formerly 2a84c48ec1ab8970fb768dc5d925e7712cb193ea] Former-commit-id: 728cccf49da4bb48416aa91e3687fa7fad8035ef
This commit is contained in:
@@ -64,6 +64,9 @@ namespace Nz
|
||||
void Set(std::size_t bit, bool val = true);
|
||||
void SetBlock(std::size_t i, Block block);
|
||||
|
||||
void ShiftLeft(std::size_t pos);
|
||||
void ShiftRight(std::size_t pos);
|
||||
|
||||
void Swap(Bitset& bitset);
|
||||
|
||||
bool Test(std::size_t bit) const;
|
||||
@@ -88,6 +91,12 @@ namespace Nz
|
||||
template<typename T> Bitset& operator=(T value);
|
||||
Bitset& operator=(Bitset&& bitset) noexcept = default;
|
||||
|
||||
Bitset operator<<(std::size_t pos) const;
|
||||
Bitset& operator<<=(std::size_t pos);
|
||||
|
||||
Bitset operator>>(std::size_t pos) const;
|
||||
Bitset& operator>>=(std::size_t pos);
|
||||
|
||||
Bitset& operator&=(const Bitset& bitset);
|
||||
Bitset& operator|=(const Bitset& bitset);
|
||||
Bitset& operator^=(const Bitset& bitset);
|
||||
|
||||
Reference in New Issue
Block a user