Skip to content

Commit

Permalink
For GCC < 4.9.0 use ::max_align_t instead of std::max_align_t.
Browse files Browse the repository at this point in the history
  • Loading branch information
haberman committed Feb 8, 2022
1 parent c8b388a commit f739286
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/google/protobuf/arenastring.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f739286

Please sign in to comment.