Commit b22e53e0 authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 5

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
parent 14410cc6
......@@ -30,6 +30,7 @@
#include <folly/Range.h>
#include <folly/Benchmark.h>
#include <folly/Portability.h>
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment