One more test for P0767:
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@326802 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -13,6 +13,8 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <type_traits>
|
#include <type_traits>
|
||||||
|
|
||||||
|
#include "test_macros.h"
|
||||||
|
|
||||||
#ifndef NULL
|
#ifndef NULL
|
||||||
#error NULL not defined
|
#error NULL not defined
|
||||||
#endif
|
#endif
|
||||||
@@ -42,8 +44,14 @@ int main()
|
|||||||
"decltype(nullptr) == nullptr_t");
|
"decltype(nullptr) == nullptr_t");
|
||||||
static_assert(sizeof(nullptr_t) == sizeof(void*),
|
static_assert(sizeof(nullptr_t) == sizeof(void*),
|
||||||
"sizeof(nullptr_t) == sizeof(void*)");
|
"sizeof(nullptr_t) == sizeof(void*)");
|
||||||
|
#if TEST_STD_VER > 17
|
||||||
|
// P0767
|
||||||
|
static_assert(std::is_trivial<max_align_t>::value,
|
||||||
|
"std::is_trivial<max_align_t>::value");
|
||||||
|
#else
|
||||||
static_assert(std::is_pod<max_align_t>::value,
|
static_assert(std::is_pod<max_align_t>::value,
|
||||||
"std::is_pod<max_align_t>::value");
|
"std::is_pod<max_align_t>::value");
|
||||||
|
#endif
|
||||||
static_assert((std::alignment_of<max_align_t>::value >=
|
static_assert((std::alignment_of<max_align_t>::value >=
|
||||||
std::alignment_of<long long>::value),
|
std::alignment_of<long long>::value),
|
||||||
"std::alignment_of<max_align_t>::value >= "
|
"std::alignment_of<max_align_t>::value >= "
|
||||||
|
|||||||
Reference in New Issue
Block a user