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 //===----------------------------------------------------------------------===//
16 #include "test_macros.h"
18 template <class T
, int expected
>
22 static_assert(std::numeric_limits
<T
>::max_exponent
== expected
, "max_exponent test 1");
23 static_assert(std::numeric_limits
<const T
>::max_exponent
== expected
, "max_exponent test 2");
24 static_assert(std::numeric_limits
<volatile T
>::max_exponent
== expected
, "max_exponent test 3");
25 static_assert(std::numeric_limits
<const volatile T
>::max_exponent
== expected
, "max_exponent test 4");
32 test
<signed char, 0>();
33 test
<unsigned char, 0>();
35 #if TEST_STD_VER > 17 && defined(__cpp_char8_t)
41 test
<unsigned short, 0>();
43 test
<unsigned int, 0>();
45 test
<unsigned long, 0>();
47 test
<unsigned long long, 0>();
48 #ifndef TEST_HAS_NO_INT128
49 test
<__int128_t
, 0>();
50 test
<__uint128_t
, 0>();
52 test
<float, FLT_MAX_EXP
>();
53 test
<double, DBL_MAX_EXP
>();
54 test
<long double, LDBL_MAX_EXP
>();