aboutsummaryrefslogtreecommitdiffstats
path: root/chilbert/SmallBitVec.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-08-19 18:22:26 +0200
committerDavid Robillard <d@drobilla.net>2018-09-29 14:50:07 +0200
commitac65326242af579d6e1a7bd71730f1c78c8bde9b (patch)
treeae5225c4b9856b3e5d454378d00867d9b0c53d26 /chilbert/SmallBitVec.hpp
parent7567f77828ff9661f85eabe3b4cfb1876b307d42 (diff)
downloadchilbert-ac65326242af579d6e1a7bd71730f1c78c8bde9b.tar.gz
chilbert-ac65326242af579d6e1a7bd71730f1c78c8bde9b.tar.bz2
chilbert-ac65326242af579d6e1a7bd71730f1c78c8bde9b.zip
Reorganize headers to make a clear public/private distinction
Diffstat (limited to 'chilbert/SmallBitVec.hpp')
-rw-r--r--chilbert/SmallBitVec.hpp13
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