Add BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS.

See https://github.com/boostorg/config/issues/257.
This commit is contained in:
jzmaddock
2019-04-02 18:40:25 +01:00
parent fb746fc6fb
commit 6ef16c8d90
3 changed files with 16 additions and 0 deletions
+8
View File
@@ -42,6 +42,13 @@ struct BOOST_ATTRIBUTE_NODISCARD nodiscard_struct {};
#define test_fallthrough(x) foobar(x)
struct empty {};
struct no_unique
{
int a;
BOOST_ATTRIBUTE_NO_UNIQUE_ADDRESS empty b;
};
int main()
{
@@ -56,6 +63,7 @@ int main()
if(BOOST_UNLIKELY(!result))
always_throw();
nodiscard_struct s;
no_unique no_un;
}
catch(int)
{