Fix folly::max_align_v for Clang on ARMv7
authorYedidya Feldblum <yfeldblum@fb.com>
Fri, 15 Dec 2017 07:26:47 +0000 (23:26 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 15 Dec 2017 07:35:09 +0000 (23:35 -0800)
commit8b3a565d0077e92d94c49425850babc65ce1766d
tree264e66e20bd9e6a78abc7ea5d13140f6140a3c8b
parent6ae2206d4a23d683877e33919a469abfdfc411e5
Fix folly::max_align_v for Clang on ARMv7

Summary:
[Folly] Fix `folly::max_align_v` for Clang on ARMv7.

There is some problem with computing the correct result of `alignof` for a compound `union` POD type, because why wouldn't there be. The result *should* just be the max of the `alignof` of the type of each field if each field is default aligned - but not on some platforms! So we must compute the max directly.

Reviewed By: mzlee, Orvid

Differential Revision: D6573548

fbshipit-source-id: 512a255fda64795104d71fde14372befa3bf41e4
folly/lang/Align.h