diff options
author | David Robillard <d@drobilla.net> | 2018-08-19 17:51:42 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-09-29 14:49:45 +0200 |
commit | c48d56bcc0c919007d712d8716c86714e387554b (patch) | |
tree | 60741b1bbf9da108303068d6e503c9e8cfce9a8b /chilbert/StaticBitVec.hpp | |
parent | 864a0cab22998cfd465f3dd2f0514f96c907ed95 (diff) | |
download | chilbert-c48d56bcc0c919007d712d8716c86714e387554b.tar.gz chilbert-c48d56bcc0c919007d712d8716c86714e387554b.tar.bz2 chilbert-c48d56bcc0c919007d712d8716c86714e387554b.zip |
Document various bit vector types
Diffstat (limited to 'chilbert/StaticBitVec.hpp')
-rw-r--r-- | chilbert/StaticBitVec.hpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/chilbert/StaticBitVec.hpp b/chilbert/StaticBitVec.hpp index 24152e1..66d136a 100644 --- a/chilbert/StaticBitVec.hpp +++ b/chilbert/StaticBitVec.hpp @@ -35,6 +35,13 @@ namespace chilbert { +/** A statically sized bit vector. + * + * This has a static number of bits encoded in the type, like std::bitset, and + * does not use dynamic allocation or store a dynamic size. + * + * @tparam N Number of bits. + */ template <size_t N> class StaticBitVec : public MultiBitVec<StaticBitVec<N>> { @@ -46,10 +53,7 @@ public: StaticBitVec() = default; /// Constructor for compatibility with DynamicBitVec - explicit StaticBitVec(const size_t bits) - { - assert(bits == size()); - } + explicit StaticBitVec(const size_t bits) { assert(bits == size()); } /// Constructor for compatibility with DynamicBitVec StaticBitVec(const size_t bits, const Rack value) |