Use BOOST_MAY_ALIAS from Boost.Config.

This commit is contained in:
Andrey Semashev
2017-07-29 17:18:27 +03:00
committed by Andrzej Krzemienski
parent 61bf382ffa
commit 7e1beb473c
2 changed files with 7 additions and 11 deletions

View File

@@ -25,12 +25,8 @@ template <class T>
class aligned_storage
{
// Borland ICEs if unnamed unions are used for this!
union
// This works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
#if defined(BOOST_OPTIONAL_DETAIL_USE_ATTRIBUTE_MAY_ALIAS)
__attribute__((__may_alias__))
#endif
dummy_u
// BOOST_MAY_ALIAS works around GCC warnings about breaking strict aliasing rules when casting storage address to T*
union BOOST_MAY_ALIAS dummy_u
{
char data[ sizeof(T) ];
BOOST_DEDUCED_TYPENAME type_with_alignment<