Add noexcept test for offsetof macro per [support.types]/p4.

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@159846 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Howard Hinnant 2012-07-06 18:39:01 +00:00
parent 7a44515588
commit 71499ad176

@ -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
}