diff options
Diffstat (limited to 'boost/move/detail/type_traits.hpp')
-rw-r--r-- | boost/move/detail/type_traits.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/boost/move/detail/type_traits.hpp b/boost/move/detail/type_traits.hpp index 272cb11af8..a3326d00e1 100644 --- a/boost/move/detail/type_traits.hpp +++ b/boost/move/detail/type_traits.hpp @@ -973,7 +973,7 @@ struct aligned_struct; template<std::size_t Len>\ struct BOOST_ALIGNMENT(A) aligned_struct<Len, A>\ {\ - char dummy[Len];\ + char data[Len];\ };\ // @@ -997,9 +997,10 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000) // 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<std::size_t Len, std::size_t Align> -struct aligned_struct_wrapper +union aligned_struct_wrapper { - aligned_struct<Len, Align> dummy; + aligned_struct<Len, Align> aligner; + char data[sizeof(aligned_struct<Len, Align>)]; }; template<std::size_t Len, std::size_t Align> @@ -1014,7 +1015,7 @@ template<class T, std::size_t Len> union aligned_union { T aligner; - char dummy[Len]; + char data[Len]; }; template<std::size_t Len, std::size_t Align, class T, bool Ok> |