1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
14 #include <type_traits>
19 static_assert( std::is_signed<T>::value, "");
20 static_assert( std::is_signed<const T>::value, "");
21 static_assert( std::is_signed<volatile T>::value, "");
22 static_assert( std::is_signed<const volatile T>::value, "");
26 void test_is_not_signed()
28 static_assert(!std::is_signed<T>::value, "");
29 static_assert(!std::is_signed<const T>::value, "");
30 static_assert(!std::is_signed<volatile T>::value, "");
31 static_assert(!std::is_signed<const volatile T>::value, "");
42 test_is_not_signed<void>();
43 test_is_not_signed<int&>();
44 test_is_not_signed<Class>();
45 test_is_not_signed<int*>();
46 test_is_not_signed<const int*>();
47 test_is_not_signed<char[3]>();
48 test_is_not_signed<char[3]>();
49 test_is_not_signed<bool>();
50 test_is_not_signed<unsigned>();
52 test_is_signed<int>();
53 test_is_signed<double>();