Added BOOST_MAY_ALIAS and BOOST_NO_MAY_ALIAS macros.

The macros can be used to mark types that can alias other types (i.e. break
C++ strict aliasing rules).
This commit is contained in:
Andrey Semashev
2017-07-12 17:51:53 +03:00
parent 3ffaa417c2
commit 4a58e5360a
10 changed files with 51 additions and 0 deletions
+3
View File
@@ -34,6 +34,9 @@ BOOST_NORETURN void always_throw()
throw 0;
}
struct BOOST_MAY_ALIAS aliasing_struct {};
typedef unsigned int BOOST_MAY_ALIAS aliasing_uint;
#define test_fallthrough(x) foobar(x)