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 //===----------------------------------------------------------------------===//
9 // ADDITIONAL_COMPILE_FLAGS: -D_LIBCPP_DISABLE_DEPRECATION_WARNINGS
11 // test numeric_limits
17 #include "test_macros.h"
20 struct two
{one _
[2];};
22 one
test(std::float_denorm_style
);
27 static_assert(std::denorm_indeterminate
== -1,
28 "std::denorm_indeterminate == -1");
29 static_assert(std::denorm_absent
== 0,
30 "std::denorm_absent == 0");
31 static_assert(std::denorm_present
== 1,
32 "std::denorm_present == 1");
33 static_assert(sizeof(test(std::denorm_present
)) == 1,
34 "sizeof(test(std::denorm_present)) == 1");
35 static_assert(sizeof(test(1)) == 2,
36 "sizeof(test(1)) == 2");