diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-13 20:23:18 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-09-13 20:23:33 +0200 |
commit | d1e9184bd02b75301b7a3da507d9a4fca970cd75 (patch) | |
tree | 1cf6ab368bb039b00b081bea6e510b4298b767af /compat/defs.hpp | |
parent | 1410c963fbbd6255357882371ab7242ea9237ce8 (diff) |
add no_unique_address macro
cf. https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/
Diffstat (limited to 'compat/defs.hpp')
-rw-r--r-- | compat/defs.hpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compat/defs.hpp b/compat/defs.hpp index 585c45d1..7fa74c9f 100644 --- a/compat/defs.hpp +++ b/compat/defs.hpp @@ -53,3 +53,11 @@ #else # define fm_noinline __attribute__((noinline)) #endif + +#ifdef _MSC_VER +// standard version not supported in MSVC v14x ABI +// see https://devblogs.microsoft.com/cppblog/msvc-cpp20-and-the-std-cpp20-switch/ +#define fm_no_unique_address msvc::no_unique_address +#else +#define fm_no_unique_address no_unique_address +#endif |