diff options
Diffstat (limited to 'chilbert/SmallBitVec.hpp')
-rw-r--r-- | chilbert/SmallBitVec.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/chilbert/SmallBitVec.hpp b/chilbert/SmallBitVec.hpp index 308d943..478cbc9 100644 --- a/chilbert/SmallBitVec.hpp +++ b/chilbert/SmallBitVec.hpp @@ -19,7 +19,7 @@ #ifndef CHILBERT_SMALLBITVEC_HPP #define CHILBERT_SMALLBITVEC_HPP -#include "chilbert/Operations.hpp" +#include "chilbert/detail/operations.hpp" #include <cassert> #include <climits> @@ -233,11 +233,14 @@ public: /// Return 1 + the index of the first set bit, or 0 if there are none size_t find_first() const { - return static_cast<size_t>(chilbert::find_first(m_rack)); + return static_cast<size_t>(detail::find_first(m_rack)); } /// Return the number of set bits - size_t count() const { return static_cast<size_t>(pop_count(m_rack)); } + size_t count() const + { + return static_cast<size_t>(detail::pop_count(m_rack)); + } /// Flip all bits (one's complement) SmallBitVec& flip() @@ -347,6 +350,8 @@ private: size_t m_size{}; }; +namespace detail { + template <> struct is_bitvec<SmallBitVec> { @@ -367,6 +372,8 @@ gray_code_inv(SmallBitVec& value) gray_code_inv<SmallBitVec::Rack>(value.rack()); } +} // namespace detail + } // namespace chilbert #endif |