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 //===----------------------------------------------------------------------===//
15 #include <type_traits>
18 #include "test_macros.h"
22 test_imp(std::true_type
)
24 assert(std::isnan(std::numeric_limits
<T
>::signaling_NaN()));
25 assert(std::isnan(std::numeric_limits
<const T
>::signaling_NaN()));
26 assert(std::isnan(std::numeric_limits
<volatile T
>::signaling_NaN()));
27 assert(std::isnan(std::numeric_limits
<const volatile T
>::signaling_NaN()));
32 test_imp(std::false_type
)
34 assert(std::numeric_limits
<T
>::signaling_NaN() == T());
35 assert(std::numeric_limits
<const T
>::signaling_NaN() == T());
36 assert(std::numeric_limits
<volatile T
>::signaling_NaN() == T());
37 assert(std::numeric_limits
<const volatile T
>::signaling_NaN() == T());
45 test_imp
<T
>(std::is_floating_point
<T
>());
53 test
<unsigned char>();
55 #if TEST_STD_VER > 17 && defined(__cpp_char8_t)
61 test
<unsigned short>();
65 test
<unsigned long>();
67 test
<unsigned long long>();
68 #ifndef TEST_HAS_NO_INT128