mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-03-05 14:06:27 -05:00
Merge bitcoin/bitcoin#29983: msvc: Compile test\fuzz\bitdeque.cpp
774359b4a9
build, msvc: Compile `test\fuzz\bitdeque.cpp` (Hennadii Stepanov)85f50a46c5
refactor: Fix "error C2248: cannot access private member" on MSVC (Hennadii Stepanov) Pull request description: This PR resolves one point from the https://github.com/bitcoin/bitcoin/pull/29774#issuecomment-2028808614: > What is the issue with the bitdeque... ? ACKs for top commit: maflcko: lgtm ACK774359b4a9
sipa: utACK774359b4a9
achow101: ACK774359b4a9
dergoegge: utACK774359b4a9
Tree-SHA512: dba5c0217b915468af08475795437a10d8e8dedfadeb319f36d9b1bf54a91a8b2c61470a6047565855276c2bc8589c7776dc19237610b65b57cc841a303de8b3
This commit is contained in:
commit
4df2d0c4ce
2 changed files with 6 additions and 7 deletions
|
@ -9,8 +9,8 @@
|
|||
<OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<!-- TODO: Fix the code and remove bitdeque.cpp and miniscript.cpp exclusion. -->
|
||||
<ClCompile Include="..\..\src\test\fuzz\*.cpp" Exclude="..\..\src\test\fuzz\bitdeque.cpp;..\..\src\test\fuzz\miniscript.cpp" />
|
||||
<!-- TODO: Fix the code and remove miniscript.cpp exclusion. -->
|
||||
<ClCompile Include="..\..\src\test\fuzz\*.cpp" Exclude="..\..\src\test\fuzz\miniscript.cpp" />
|
||||
<ClCompile Include="..\..\src\test\fuzz\util\descriptor.cpp">
|
||||
<ObjectFileName>$(IntDir)test_fuzz_util_descriptor.obj</ObjectFileName>
|
||||
</ClCompile>
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue