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>
15 #include "test_macros.h"
18 void test_integral_imp()
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
, "");
32 test_integral_imp
<T
>();
33 test_integral_imp
<const T
>();
34 test_integral_imp
<volatile T
>();
35 test_integral_imp
<const volatile T
>();
40 test_integral
<bool>();
41 test_integral
<char>();
42 test_integral
<signed char>();
43 test_integral
<unsigned char>();
44 test_integral
<wchar_t>();
45 test_integral
<short>();
46 test_integral
<unsigned short>();
48 test_integral
<unsigned int>();
49 test_integral
<long>();
50 test_integral
<unsigned long>();
51 test_integral
<long long>();
52 test_integral
<unsigned long long>();
53 #ifndef TEST_HAS_NO_INT128
54 test_integral
<__int128_t
>();
55 test_integral
<__uint128_t
>();