1 //===----------------------------------------------------------------------===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 
9 // type_traits
10 
11 // class
12 
13 #include <type_traits>
14 
15 #include "test_macros.h"
16 
17 template <class T>
test_class_imp()18 void test_class_imp()
19 {
20     static_assert(!std::is_reference<T>::value, "");
21     static_assert(!std::is_arithmetic<T>::value, "");
22     static_assert(!std::is_fundamental<T>::value, "");
23     static_assert( std::is_object<T>::value, "");
24     static_assert(!std::is_scalar<T>::value, "");
25     static_assert( std::is_compound<T>::value, "");
26     static_assert(!std::is_member_pointer<T>::value, "");
27 }
28 
29 template <class T>
test_class()30 void test_class()
31 {
32     test_class_imp<T>();
33     test_class_imp<const T>();
34     test_class_imp<volatile T>();
35     test_class_imp<const volatile T>();
36 }
37 
38 class Class
39 {
40 };
41 
42 class incomplete_type;
43 
main(int,char **)44 int main(int, char**)
45 {
46     test_class<Class>();
47     test_class<incomplete_type>();
48 
49   return 0;
50 }
51