summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libcxx/test/language.support/support.types/offsetof.pass.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcxx/test/language.support/support.types/offsetof.pass.cpp b/libcxx/test/language.support/support.types/offsetof.pass.cpp
index 758f21529ff..e36ac22974f 100644
--- a/libcxx/test/language.support/support.types/offsetof.pass.cpp
+++ b/libcxx/test/language.support/support.types/offsetof.pass.cpp
@@ -13,6 +13,14 @@
#error offsetof not defined
#endif
+struct A
+{
+ int x;
+};
+
int main()
{
+#if (__has_feature(cxx_noexcept))
+ static_assert(noexcept(offsetof(A, x)), "");
+#endif
}
OpenPOWER on IntegriCloud