From ac65326242af579d6e1a7bd71730f1c78c8bde9b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 19 Aug 2018 18:22:26 +0200 Subject: Reorganize headers to make a clear public/private distinction --- chilbert/SmallBitVec.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'chilbert/SmallBitVec.hpp') 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 #include @@ -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(chilbert::find_first(m_rack)); + return static_cast(detail::find_first(m_rack)); } /// Return the number of set bits - size_t count() const { return static_cast(pop_count(m_rack)); } + size_t count() const + { + return static_cast(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 { @@ -367,6 +372,8 @@ gray_code_inv(SmallBitVec& value) gray_code_inv(value.rack()); } +} // namespace detail + } // namespace chilbert #endif -- cgit v1.2.1