Make the block size of vector<bool> consistent
This commit is contained in:
@@ -43,8 +43,11 @@ BOOST_AUTO_TEST_CASE(rw_short)
|
||||
BOOST_AUTO_TEST_CASE(rw_bool)
|
||||
{
|
||||
std::size_t num_elements = 1000;
|
||||
std::unique_ptr<char[]> data = std::make_unique<char[]>(num_elements / sizeof(std::uint32_t));
|
||||
util::vector_view<bool> view(reinterpret_cast<std::uint32_t *>(data.get()), num_elements);
|
||||
auto data = std::make_unique<typename vector_view<bool>::Word[]>(
|
||||
(num_elements + sizeof(typename vector_view<bool>::Word) - 1) /
|
||||
sizeof(typename vector_view<bool>::Word));
|
||||
util::vector_view<bool> view(reinterpret_cast<typename vector_view<bool>::Word *>(data.get()),
|
||||
num_elements);
|
||||
std::vector<bool> reference;
|
||||
|
||||
std::mt19937 rng;
|
||||
|
||||
Reference in New Issue
Block a user