diff --git a/include/boost/move/detail/type_traits.hpp b/include/boost/move/detail/type_traits.hpp index 1b5d838..272cb11 100644 --- a/include/boost/move/detail/type_traits.hpp +++ b/include/boost/move/detail/type_traits.hpp @@ -967,14 +967,13 @@ typedef union max_align max_align_t; #if !defined(BOOST_NO_ALIGNMENT) template -struct aligned_storage_impl; +struct aligned_struct; #define BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(A)\ template\ -struct BOOST_ALIGNMENT(A) aligned_storage_impl\ +struct BOOST_ALIGNMENT(A) aligned_struct\ {\ char dummy[Len];\ - typedef aligned_storage_impl type;\ };\ // @@ -995,6 +994,20 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000) #undef BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT +// Workaround for bogus [-Wignored-attributes] warning on GCC 6.x/7.x: don't use a type that "directly" carries the alignment attribute. +// See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82270 +template +struct aligned_struct_wrapper +{ + aligned_struct dummy; +}; + +template +struct aligned_storage_impl +{ + typedef aligned_struct_wrapper type; +}; + #else //BOOST_NO_ALIGNMENT template