summaryrefslogtreecommitdiffstats
path: root/libcxx/test/support/test_macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/support/test_macros.h')
-rw-r--r--libcxx/test/support/test_macros.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/libcxx/test/support/test_macros.h b/libcxx/test/support/test_macros.h
index 32d49be8bff..40d366ab19d 100644
--- a/libcxx/test/support/test_macros.h
+++ b/libcxx/test/support/test_macros.h
@@ -86,6 +86,8 @@
#endif
#if TEST_STD_VER >= 11
+#define TEST_ALIGNOF(...) alignof(__VA_ARGS__)
+#define TEST_ALIGNAS(...) alignas(__VA_ARGS__)
#define TEST_CONSTEXPR constexpr
#define TEST_NOEXCEPT noexcept
#define TEST_NOEXCEPT_COND(...) noexcept(__VA_ARGS__)
@@ -94,15 +96,19 @@
# else
# define TEST_CONSTEXPR_CXX14
# endif
-#define TEST_ALIGNOF(...) alignof(__VA_ARGS__)
-#define TEST_ALIGNAS(...) alignas(__VA_ARGS__)
+# if TEST_STD_VER > 14
+# define TEST_THROW_SPEC(...)
+# else
+# define TEST_THROW_SPEC(...) throw(__VA_ARGS__)
+# endif
#else
+#define TEST_ALIGNOF(...) __alignof(__VA_ARGS__)
+#define TEST_ALIGNAS(...) __attribute__((__aligned__(__VA_ARGS__)))
#define TEST_CONSTEXPR
#define TEST_CONSTEXPR_CXX14
#define TEST_NOEXCEPT throw()
#define TEST_NOEXCEPT_COND(...)
-#define TEST_ALIGNOF(...) __alignof(__VA_ARGS__)
-#define TEST_ALIGNAS(...) __attribute__((__aligned__(__VA_ARGS__)))
+#define TEST_THROW_SPEC(...) throw(__VA_ARGS__)
#endif
#define TEST_ALIGNAS_TYPE(...) TEST_ALIGNAS(TEST_ALIGNOF(__VA_ARGS__))
OpenPOWER on IntegriCloud