From b22e53e035bce899409e19cf4f32d8b251758422 Mon Sep 17 00:00:00 2001 From: Christopher Dykes Date: Thu, 4 Aug 2016 16:32:18 -0700 Subject: [PATCH] Use std::max_align_t rather than __attribute__((__aligned__)) to get max alignment Summary: Because the former is standardized, and the latter is a syntax error under MSVC. Reviewed By: yfeldblum Differential Revision: D3672667 fbshipit-source-id: c0149b11367e36ba5574625240c41a167348199f --- folly/test/ThreadCachedArenaTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/folly/test/ThreadCachedArenaTest.cpp b/folly/test/ThreadCachedArenaTest.cpp index 22ba1057..9332c739 100644 --- a/folly/test/ThreadCachedArenaTest.cpp +++ b/folly/test/ThreadCachedArenaTest.cpp @@ -30,6 +30,7 @@ #include #include +#include using namespace folly; @@ -94,8 +95,7 @@ void ArenaTester::merge(ArenaTester&& other) { } // namespace TEST(ThreadCachedArena, BlockSize) { - struct Align { char c; } __attribute__((__aligned__)); - static const size_t alignment = alignof(Align); + static const size_t alignment = alignof(std::max_align_t); static const size_t requestedBlockSize = 64; ThreadCachedArena arena(requestedBlockSize); -- 2.34.1