diff options
author | David Robillard <d@drobilla.net> | 2018-08-18 09:06:14 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-29 14:46:30 +0200 |
commit | fc24951cba40ab471f64f9f2825b4abe541e1283 (patch) | |
tree | 10d2fc48dcd6da29a0f3419ccebec1fa70962aa8 /chilbert | |
parent | 1d93b32df165b1ad96b2d1b17d553eb2a37b696c (diff) | |
download | chilbert-fc24951cba40ab471f64f9f2825b4abe541e1283.tar.gz chilbert-fc24951cba40ab471f64f9f2825b4abe541e1283.tar.bz2 chilbert-fc24951cba40ab471f64f9f2825b4abe541e1283.zip |
Add NOT operators
Diffstat (limited to 'chilbert')
-rw-r--r-- | chilbert/BigBitVec.hpp | 7 | ||||
-rw-r--r-- | chilbert/FixBitVec.hpp | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/chilbert/BigBitVec.hpp b/chilbert/BigBitVec.hpp index 37ef870..30b8f82 100644 --- a/chilbert/BigBitVec.hpp +++ b/chilbert/BigBitVec.hpp @@ -249,6 +249,13 @@ public: return t; } + CBigBitVec operator~() const + { + CBigBitVec t(*this); + t.flip(); + return t; + } + CBigBitVec& operator<<=(const size_t bits) { assert(bits < size()); diff --git a/chilbert/FixBitVec.hpp b/chilbert/FixBitVec.hpp index 0bc2032..05dae1f 100644 --- a/chilbert/FixBitVec.hpp +++ b/chilbert/FixBitVec.hpp @@ -166,6 +166,13 @@ public: return t; } + CFixBitVec operator~() const + { + CFixBitVec t(*this); + t.flip(); + return t; + } + CFixBitVec& operator<<=(const size_t bits) { assert(bits < size()); |