diff --git a/test/pmr/test_pmr_block_pool.cpp b/test/pmr/test_pmr_block_pool.cpp index 1271dd8f..c354b440 100644 --- a/test/pmr/test_pmr_block_pool.cpp +++ b/test/pmr/test_pmr_block_pool.cpp @@ -1,5 +1,6 @@ #include +#include #include "gtest/gtest.h" @@ -16,11 +17,11 @@ TEST(block_pool, central_cache_allocator) { TEST(block_pool, block) { pmr::block<1> b1; - EXPECT_EQ(sizeof(b1), sizeof(void*)); - pmr::block b2; - EXPECT_EQ(sizeof(b2), sizeof(void*)); - pmr::block b3; - EXPECT_EQ(sizeof(b3), sizeof(void*) * 2); + EXPECT_EQ(sizeof(b1), (std::max)(alignof(std::max_align_t), sizeof(void *))); + pmr::block b2; + EXPECT_EQ(sizeof(b2), (std::max)(alignof(std::max_align_t), sizeof(void *))); + pmr::block b3; + EXPECT_EQ(sizeof(b3), (std::max)(alignof(std::max_align_t), sizeof(void *) * 2)); } TEST(block_pool, central_cache_pool_ctor) {