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:
parent
7a44515588
commit
71499ad176
@ -13,6 +13,14 @@
|
|||||||
#error offsetof not defined
|
#error offsetof not defined
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
struct A
|
||||||
|
{
|
||||||
|
int x;
|
||||||
|
};
|
||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
|
#if (__has_feature(cxx_noexcept))
|
||||||
|
static_assert(noexcept(offsetof(A, x)), "");
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user