Introduce folly::max_align_t and folly::max_align_v
authorPhil Willoughby <philwill@fb.com>
Thu, 20 Jul 2017 12:28:49 +0000 (05:28 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 20 Jul 2017 12:37:58 +0000 (05:37 -0700)
commit2177f05a16891e5dc381ccfa56d36ce91418aa09
tree1bc0abb5fbdfa228e0300b20d52b5a9a40abfd25
parent339c14d3295071baf13066aae1e8b7be1df62b34
Introduce folly::max_align_t and folly::max_align_v

Summary:
`folly::max_align_t` is a portable replacement for `std::max_align_t`.

`folly::max_align_v` is a `constexpr size_t` with the same value as `alignof(folly::max_align_t)`

32-bit iOS environments have `alignof(std::max_align_t) == 4`, which is not correct. This is more
correct in that I have not yet found a more-aligned basic type.

Reviewed By: yfeldblum

Differential Revision: D5442333

fbshipit-source-id: 0a93e48a730d65ef76e04f132b5976c93587b14c
folly/CachelinePadded.h
folly/MicroSpinLock.h
folly/Portability.h
folly/concurrency/CacheLocality.cpp
folly/concurrency/CacheLocality.h
folly/experimental/hazptr/memory_resource.h
folly/io/IOBuf.cpp
folly/test/CachelinePaddedTest.cpp
folly/test/ThreadCachedArenaTest.cpp