For GCC < 4.9.0 use ::max_align_t instead of std::max_align_t.

This commit is contained in:
Joshua Haberman 2022-02-08 10:31:54 -08:00
parent c8b388a6cb
commit f739286b1a

View File

@ -57,6 +57,8 @@ namespace {
// - alignof(std::string)
#ifdef __STDCPP_DEFAULT_NEW_ALIGNMENT__
constexpr size_t kNewAlign = __STDCPP_DEFAULT_NEW_ALIGNMENT__;
#elif (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) < 40900
constexpr size_t kNewAlign = alignof(::max_align_t);
#else
constexpr size_t kNewAlign = alignof(std::max_align_t);
#endif