More of P0006R0: type traits variable aliases for C++17.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@252406 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -20,6 +20,12 @@ void test_has_virtual_destructor()
|
||||
static_assert( std::has_virtual_destructor<const T>::value, "");
|
||||
static_assert( std::has_virtual_destructor<volatile T>::value, "");
|
||||
static_assert( std::has_virtual_destructor<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::has_virtual_destructor_v<T>, "");
|
||||
static_assert( std::has_virtual_destructor_v<const T>, "");
|
||||
static_assert( std::has_virtual_destructor_v<volatile T>, "");
|
||||
static_assert( std::has_virtual_destructor_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -29,6 +35,12 @@ void test_has_not_virtual_destructor()
|
||||
static_assert(!std::has_virtual_destructor<const T>::value, "");
|
||||
static_assert(!std::has_virtual_destructor<volatile T>::value, "");
|
||||
static_assert(!std::has_virtual_destructor<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::has_virtual_destructor_v<T>, "");
|
||||
static_assert(!std::has_virtual_destructor_v<const T>, "");
|
||||
static_assert(!std::has_virtual_destructor_v<volatile T>, "");
|
||||
static_assert(!std::has_virtual_destructor_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -26,12 +26,18 @@ template <class T, class U>
|
||||
void test_is_assignable()
|
||||
{
|
||||
static_assert(( std::is_assignable<T, U>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_assignable_v<T, U>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
void test_is_not_assignable()
|
||||
{
|
||||
static_assert((!std::is_assignable<T, U>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( !std::is_assignable_v<T, U>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
struct D;
|
||||
|
@@ -38,30 +38,45 @@ template <class T>
|
||||
void test_is_constructible()
|
||||
{
|
||||
static_assert( (std::is_constructible<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0>
|
||||
void test_is_constructible()
|
||||
{
|
||||
static_assert( (std::is_constructible<T, A0>::value), "");
|
||||
static_assert(( std::is_constructible<T, A0>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_constructible_v<T, A0>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0, class A1>
|
||||
void test_is_constructible()
|
||||
{
|
||||
static_assert( (std::is_constructible<T, A0, A1>::value), "");
|
||||
static_assert(( std::is_constructible<T, A0, A1>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_constructible_v<T, A0, A1>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_constructible()
|
||||
{
|
||||
static_assert((!std::is_constructible<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_constructible_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0>
|
||||
void test_is_not_constructible()
|
||||
{
|
||||
static_assert((!std::is_constructible<T, A0>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_constructible_v<T, A0>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_is_copy_assignable()
|
||||
{
|
||||
static_assert(( std::is_copy_assignable<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_copy_assignable_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_copy_assignable()
|
||||
{
|
||||
static_assert((!std::is_copy_assignable<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_copy_assignable_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_is_copy_constructible()
|
||||
{
|
||||
static_assert( std::is_copy_constructible<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_copy_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_copy_constructible()
|
||||
{
|
||||
static_assert(!std::is_copy_constructible<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_copy_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -20,6 +20,12 @@ void test_is_default_constructible()
|
||||
static_assert( std::is_default_constructible<const T>::value, "");
|
||||
static_assert( std::is_default_constructible<volatile T>::value, "");
|
||||
static_assert( std::is_default_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_default_constructible_v<T>, "");
|
||||
static_assert( std::is_default_constructible_v<const T>, "");
|
||||
static_assert( std::is_default_constructible_v<volatile T>, "");
|
||||
static_assert( std::is_default_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -29,6 +35,12 @@ void test_is_not_default_constructible()
|
||||
static_assert(!std::is_default_constructible<const T>::value, "");
|
||||
static_assert(!std::is_default_constructible<volatile T>::value, "");
|
||||
static_assert(!std::is_default_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_default_constructible_v<T>, "");
|
||||
static_assert(!std::is_default_constructible_v<const T>, "");
|
||||
static_assert(!std::is_default_constructible_v<volatile T>, "");
|
||||
static_assert(!std::is_default_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -22,6 +22,12 @@ void test_is_destructible()
|
||||
static_assert( std::is_destructible<const T>::value, "");
|
||||
static_assert( std::is_destructible<volatile T>::value, "");
|
||||
static_assert( std::is_destructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_destructible_v<T>, "");
|
||||
static_assert( std::is_destructible_v<const T>, "");
|
||||
static_assert( std::is_destructible_v<volatile T>, "");
|
||||
static_assert( std::is_destructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -31,6 +37,12 @@ void test_is_not_destructible()
|
||||
static_assert(!std::is_destructible<const T>::value, "");
|
||||
static_assert(!std::is_destructible<volatile T>::value, "");
|
||||
static_assert(!std::is_destructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_destructible_v<T>, "");
|
||||
static_assert(!std::is_destructible_v<const T>, "");
|
||||
static_assert(!std::is_destructible_v<volatile T>, "");
|
||||
static_assert(!std::is_destructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty {};
|
||||
|
@@ -79,7 +79,7 @@ int main()
|
||||
// In C++14, cv-void is is a literal type
|
||||
#if TEST_STD_VER < 14
|
||||
test_is_not_literal_type<void>();
|
||||
#else TEST_STD_VER > 14
|
||||
#elif TEST_STD_VER > 14
|
||||
test_is_literal_type<void>();
|
||||
#endif
|
||||
|
||||
|
@@ -16,13 +16,19 @@
|
||||
template <class T>
|
||||
void test_is_move_assignable()
|
||||
{
|
||||
static_assert( std::is_move_assignable<T>::value, "");
|
||||
static_assert(( std::is_move_assignable<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_move_assignable_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_move_assignable()
|
||||
{
|
||||
static_assert(!std::is_move_assignable<T>::value, "");
|
||||
static_assert((!std::is_move_assignable<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_move_assignable_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_is_move_constructible()
|
||||
{
|
||||
static_assert( std::is_move_constructible<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_move_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_move_constructible()
|
||||
{
|
||||
static_assert(!std::is_move_constructible<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_move_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -17,12 +17,18 @@ template <class T, class U>
|
||||
void test_is_nothrow_assignable()
|
||||
{
|
||||
static_assert(( std::is_nothrow_assignable<T, U>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_nothrow_assignable_v<T, U>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
void test_is_not_nothrow_assignable()
|
||||
{
|
||||
static_assert((!std::is_nothrow_assignable<T, U>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_nothrow_assignable_v<T, U>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
struct A
|
||||
|
@@ -18,30 +18,45 @@ template <class T>
|
||||
void test_is_nothrow_constructible()
|
||||
{
|
||||
static_assert(( std::is_nothrow_constructible<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_nothrow_constructible_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0>
|
||||
void test_is_nothrow_constructible()
|
||||
{
|
||||
static_assert(( std::is_nothrow_constructible<T, A0>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_nothrow_constructible_v<T, A0>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_nothrow_constructible()
|
||||
{
|
||||
static_assert((!std::is_nothrow_constructible<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_nothrow_constructible_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0>
|
||||
void test_is_not_nothrow_constructible()
|
||||
{
|
||||
static_assert((!std::is_nothrow_constructible<T, A0>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_nothrow_constructible_v<T, A0>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0, class A1>
|
||||
void test_is_not_nothrow_constructible()
|
||||
{
|
||||
static_assert((!std::is_nothrow_constructible<T, A0, A1>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_nothrow_constructible_v<T, A0, A1>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_has_nothrow_assign()
|
||||
{
|
||||
static_assert( std::is_nothrow_copy_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_copy_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_has_not_nothrow_assign()
|
||||
{
|
||||
static_assert(!std::is_nothrow_copy_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_nothrow_copy_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -18,6 +18,10 @@ void test_is_nothrow_copy_constructible()
|
||||
{
|
||||
static_assert( std::is_nothrow_copy_constructible<T>::value, "");
|
||||
static_assert( std::is_nothrow_copy_constructible<const T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_copy_constructible_v<T>, "");
|
||||
static_assert( std::is_nothrow_copy_constructible_v<const T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -27,6 +31,12 @@ void test_has_not_nothrow_copy_constructor()
|
||||
static_assert(!std::is_nothrow_copy_constructible<const T>::value, "");
|
||||
static_assert(!std::is_nothrow_copy_constructible<volatile T>::value, "");
|
||||
static_assert(!std::is_nothrow_copy_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_nothrow_copy_constructible_v<T>, "");
|
||||
static_assert(!std::is_nothrow_copy_constructible_v<const T>, "");
|
||||
static_assert(!std::is_nothrow_copy_constructible_v<volatile T>, "");
|
||||
static_assert(!std::is_nothrow_copy_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -20,6 +20,12 @@ void test_is_nothrow_default_constructible()
|
||||
static_assert( std::is_nothrow_default_constructible<const T>::value, "");
|
||||
static_assert( std::is_nothrow_default_constructible<volatile T>::value, "");
|
||||
static_assert( std::is_nothrow_default_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_default_constructible_v<T>, "");
|
||||
static_assert( std::is_nothrow_default_constructible_v<const T>, "");
|
||||
static_assert( std::is_nothrow_default_constructible_v<volatile T>, "");
|
||||
static_assert( std::is_nothrow_default_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -29,6 +35,12 @@ void test_has_not_nothrow_default_constructor()
|
||||
static_assert(!std::is_nothrow_default_constructible<const T>::value, "");
|
||||
static_assert(!std::is_nothrow_default_constructible<volatile T>::value, "");
|
||||
static_assert(!std::is_nothrow_default_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_nothrow_default_constructible_v<T>, "");
|
||||
static_assert(!std::is_nothrow_default_constructible_v<const T>, "");
|
||||
static_assert(!std::is_nothrow_default_constructible_v<volatile T>, "");
|
||||
static_assert(!std::is_nothrow_default_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -22,6 +22,12 @@ void test_is_nothrow_destructible()
|
||||
static_assert( std::is_nothrow_destructible<const T>::value, "");
|
||||
static_assert( std::is_nothrow_destructible<volatile T>::value, "");
|
||||
static_assert( std::is_nothrow_destructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_destructible_v<T>, "");
|
||||
static_assert( std::is_nothrow_destructible_v<const T>, "");
|
||||
static_assert( std::is_nothrow_destructible_v<volatile T>, "");
|
||||
static_assert( std::is_nothrow_destructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -31,6 +37,12 @@ void test_is_not_nothrow_destructible()
|
||||
static_assert(!std::is_nothrow_destructible<const T>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<volatile T>::value, "");
|
||||
static_assert(!std::is_nothrow_destructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_nothrow_destructible_v<T>, "");
|
||||
static_assert(!std::is_nothrow_destructible_v<const T>, "");
|
||||
static_assert(!std::is_nothrow_destructible_v<volatile T>, "");
|
||||
static_assert(!std::is_nothrow_destructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_has_nothrow_assign()
|
||||
{
|
||||
static_assert( std::is_nothrow_move_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_move_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_has_not_nothrow_assign()
|
||||
{
|
||||
static_assert(!std::is_nothrow_move_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_move_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -18,6 +18,10 @@ void test_is_nothrow_move_constructible()
|
||||
{
|
||||
static_assert( std::is_nothrow_move_constructible<T>::value, "");
|
||||
static_assert( std::is_nothrow_move_constructible<const T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_nothrow_move_constructible_v<T>, "");
|
||||
static_assert( std::is_nothrow_move_constructible_v<const T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -27,6 +31,12 @@ void test_has_not_nothrow_move_constructor()
|
||||
static_assert(!std::is_nothrow_move_constructible<const T>::value, "");
|
||||
static_assert(!std::is_nothrow_move_constructible<volatile T>::value, "");
|
||||
static_assert(!std::is_nothrow_move_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_nothrow_move_constructible_v<T>, "");
|
||||
static_assert(!std::is_nothrow_move_constructible_v<const T>, "");
|
||||
static_assert(!std::is_nothrow_move_constructible_v<volatile T>, "");
|
||||
static_assert(!std::is_nothrow_move_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -17,12 +17,18 @@ template <class T, class U>
|
||||
void test_is_trivially_assignable()
|
||||
{
|
||||
static_assert(( std::is_trivially_assignable<T, U>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_trivially_assignable_v<T, U>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class U>
|
||||
void test_is_not_trivially_assignable()
|
||||
{
|
||||
static_assert((!std::is_trivially_assignable<T, U>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_trivially_assignable_v<T, U>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
struct A
|
||||
|
@@ -18,30 +18,45 @@ template <class T>
|
||||
void test_is_trivially_constructible()
|
||||
{
|
||||
static_assert(( std::is_trivially_constructible<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_trivially_constructible_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0>
|
||||
void test_is_trivially_constructible()
|
||||
{
|
||||
static_assert(( std::is_trivially_constructible<T, A0>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(( std::is_trivially_constructible_v<T, A0>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_is_not_trivially_constructible()
|
||||
{
|
||||
static_assert((!std::is_trivially_constructible<T>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_trivially_constructible_v<T>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0>
|
||||
void test_is_not_trivially_constructible()
|
||||
{
|
||||
static_assert((!std::is_trivially_constructible<T, A0>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_trivially_constructible_v<T, A0>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T, class A0, class A1>
|
||||
void test_is_not_trivially_constructible()
|
||||
{
|
||||
static_assert((!std::is_trivially_constructible<T, A0, A1>::value), "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert((!std::is_trivially_constructible_v<T, A0, A1>), "");
|
||||
#endif
|
||||
}
|
||||
|
||||
struct A
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_has_trivially_copy_assignable()
|
||||
{
|
||||
static_assert( std::is_trivially_copy_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_trivially_copy_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_has_not_trivially_copy_assignable()
|
||||
{
|
||||
static_assert(!std::is_trivially_copy_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_trivially_copy_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -18,6 +18,10 @@ void test_is_trivially_copy_constructible()
|
||||
{
|
||||
static_assert( std::is_trivially_copy_constructible<T>::value, "");
|
||||
static_assert( std::is_trivially_copy_constructible<const T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_trivially_copy_constructible_v<T>, "");
|
||||
static_assert( std::is_trivially_copy_constructible_v<const T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -25,6 +29,10 @@ void test_has_not_trivial_copy_constructor()
|
||||
{
|
||||
static_assert(!std::is_trivially_copy_constructible<T>::value, "");
|
||||
static_assert(!std::is_trivially_copy_constructible<const T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_trivially_copy_constructible_v<T>, "");
|
||||
static_assert(!std::is_trivially_copy_constructible_v<const T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -20,6 +20,12 @@ void test_is_trivially_default_constructible()
|
||||
static_assert( std::is_trivially_default_constructible<const T>::value, "");
|
||||
static_assert( std::is_trivially_default_constructible<volatile T>::value, "");
|
||||
static_assert( std::is_trivially_default_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_trivially_default_constructible_v<T>, "");
|
||||
static_assert( std::is_trivially_default_constructible_v<const T>, "");
|
||||
static_assert( std::is_trivially_default_constructible_v<volatile T>, "");
|
||||
static_assert( std::is_trivially_default_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -29,6 +35,12 @@ void test_has_not_trivial_default_constructor()
|
||||
static_assert(!std::is_trivially_default_constructible<const T>::value, "");
|
||||
static_assert(!std::is_trivially_default_constructible<volatile T>::value, "");
|
||||
static_assert(!std::is_trivially_default_constructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_trivially_default_constructible_v<T>, "");
|
||||
static_assert(!std::is_trivially_default_constructible_v<const T>, "");
|
||||
static_assert(!std::is_trivially_default_constructible_v<volatile T>, "");
|
||||
static_assert(!std::is_trivially_default_constructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -22,6 +22,12 @@ void test_is_trivially_destructible()
|
||||
static_assert( std::is_trivially_destructible<const T>::value, "");
|
||||
static_assert( std::is_trivially_destructible<volatile T>::value, "");
|
||||
static_assert( std::is_trivially_destructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_trivially_destructible_v<T>, "");
|
||||
static_assert( std::is_trivially_destructible_v<const T>, "");
|
||||
static_assert( std::is_trivially_destructible_v<volatile T>, "");
|
||||
static_assert( std::is_trivially_destructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
@@ -31,6 +37,12 @@ void test_is_not_trivially_destructible()
|
||||
static_assert(!std::is_trivially_destructible<const T>::value, "");
|
||||
static_assert(!std::is_trivially_destructible<volatile T>::value, "");
|
||||
static_assert(!std::is_trivially_destructible<const volatile T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_trivially_destructible_v<T>, "");
|
||||
static_assert(!std::is_trivially_destructible_v<const T>, "");
|
||||
static_assert(!std::is_trivially_destructible_v<volatile T>, "");
|
||||
static_assert(!std::is_trivially_destructible_v<const volatile T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
struct PublicDestructor { public: ~PublicDestructor() {}};
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_has_trivial_assign()
|
||||
{
|
||||
static_assert( std::is_trivially_move_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_trivially_move_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_has_not_trivial_assign()
|
||||
{
|
||||
static_assert(!std::is_trivially_move_assignable<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_trivially_move_assignable_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
@@ -17,12 +17,18 @@ template <class T>
|
||||
void test_is_trivially_move_constructible()
|
||||
{
|
||||
static_assert( std::is_trivially_move_constructible<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert( std::is_trivially_move_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void test_has_not_trivial_move_constructor()
|
||||
{
|
||||
static_assert(!std::is_trivially_move_constructible<T>::value, "");
|
||||
#if TEST_STD_VER > 14
|
||||
static_assert(!std::is_trivially_move_constructible_v<T>, "");
|
||||
#endif
|
||||
}
|
||||
|
||||
class Empty
|
||||
|
Reference in New Issue
Block a user