aboutsummaryrefslogtreecommitdiffstats
path: root/chilbert/BigBitVec.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'chilbert/BigBitVec.hpp')
-rw-r--r--chilbert/BigBitVec.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/chilbert/BigBitVec.hpp b/chilbert/BigBitVec.hpp
index 8f8dc6d..37ef870 100644
--- a/chilbert/BigBitVec.hpp
+++ b/chilbert/BigBitVec.hpp
@@ -26,6 +26,7 @@
#include <cstddef>
#include <cstdlib>
#include <cstring>
+#include <iostream>
#include <memory>
#define FBVS_NEEDED(b) ((std::max(b, size_t(1)) + FBV_BITS - 1) / FBV_BITS)
@@ -541,6 +542,15 @@ grayCodeInv(CBigBitVec& value)
}
}
+inline std::ostream&
+operator<<(std::ostream& os, const CBigBitVec& vec)
+{
+ for (size_t i = 0; i < vec.size(); ++i) {
+ os << vec.test(vec.size() - i - 1);
+ }
+ return os;
+}
+
} // namespace chilbert
#endif