diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-04-28 07:11:24 +0100 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2024-04-28 07:11:24 +0100 |
commit | 85f50a46c50e7e56b5ee2d7258021939cd80c550 (patch) | |
tree | 7f062c1f2b7346d18c51116351e55b03f847e776 | |
parent | 3aaf7328eb656b642e5f0f74f3e4d51645a1d0ab (diff) | |
download | bitcoin-85f50a46c50e7e56b5ee2d7258021939cd80c550.tar.xz |
refactor: Fix "error C2248: cannot access private member" on MSVC
-rw-r--r-- | src/util/bitdeque.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/util/bitdeque.h b/src/util/bitdeque.h index 1e34b72475..ac9d302420 100644 --- a/src/util/bitdeque.h +++ b/src/util/bitdeque.h @@ -14,18 +14,17 @@ /** Class that mimics std::deque<bool>, but with std::vector<bool>'s bit packing. * - * BlobSize selects the (minimum) number of bits that are allocated at once. + * BITS_PER_WORD selects the (minimum) number of bits that are allocated at once. * Larger values reduce the asymptotic memory usage overhead, at the cost of * needing larger up-front allocations. The default is 4096 bytes. */ -template<int BlobSize = 4096 * 8> +template<int BITS_PER_WORD = 4096 * 8> class bitdeque { // Internal definitions - using word_type = std::bitset<BlobSize>; + using word_type = std::bitset<BITS_PER_WORD>; using deque_type = std::deque<word_type>; - static_assert(BlobSize > 0); - static constexpr int BITS_PER_WORD = BlobSize; + static_assert(BITS_PER_WORD > 0); // Forward and friend declarations of iterator types. template<bool Const> class Iterator; |