1 //===----------------------------------------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
13 #include <type_traits>
14 #include "test_macros.h"
19 static_assert( std::is_pod
<T
>::value
, "");
20 static_assert( std::is_pod
<const T
>::value
, "");
21 static_assert( std::is_pod
<volatile T
>::value
, "");
22 static_assert( std::is_pod
<const volatile T
>::value
, "");
24 static_assert( std::is_pod_v
<T
>, "");
25 static_assert( std::is_pod_v
<const T
>, "");
26 static_assert( std::is_pod_v
<volatile T
>, "");
27 static_assert( std::is_pod_v
<const volatile T
>, "");
32 void test_is_not_pod()
34 static_assert(!std::is_pod
<T
>::value
, "");
35 static_assert(!std::is_pod
<const T
>::value
, "");
36 static_assert(!std::is_pod
<volatile T
>::value
, "");
37 static_assert(!std::is_pod
<const volatile T
>::value
, "");
39 static_assert(!std::is_pod_v
<T
>, "");
40 static_assert(!std::is_pod_v
<const T
>, "");
41 static_assert(!std::is_pod_v
<volatile T
>, "");
42 static_assert(!std::is_pod_v
<const volatile T
>, "");
54 test_is_not_pod
<void>();
55 test_is_not_pod
<int&>();
56 test_is_not_pod
<Class
>();
59 test_is_pod
<double>();
61 test_is_pod
<const int*>();
62 test_is_pod
<char[3]>();
63 test_is_pod
<char[]>();