From 0d0357bd40ede98452ee6730f7dcdeff191e31bd Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Wed, 24 Jan 2024 19:02:37 +0000 Subject: [PATCH] stdafx: Add macro for [[no_unique_address]] --- src/stdafx.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/stdafx.h b/src/stdafx.h index 4af5eb6b64..30935ddb9b 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -122,6 +122,14 @@ # define EMPTY_BASES #endif +#if defined(_MSC_VER) && _MSC_VER >= 1929 +# define NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] +#elif defined(__has_cpp_attribute) && __has_cpp_attribute(no_unique_address) +# define NO_UNIQUE_ADDRESS [[no_unique_address]] +#else +# define NO_UNIQUE_ADDRESS +#endif + /* Stuff for MSVC */ #if defined(_MSC_VER) # pragma once