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

pull/9479/head
Joshua Haberman 3 years ago
parent c8b388a6cb
commit f739286b1a
  1. 2
      src/google/protobuf/arenastring.cc

@ -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

Loading…
Cancel
Save