1 | //===----------------------------------------------------------------------===// |
2 | // |
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 |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | // |
9 | // WARNING: This test was generated by generate_feature_test_macro_components.py |
10 | // and should not be edited manually. |
11 | // |
12 | // clang-format off |
13 | |
14 | // <cstdlib> |
15 | |
16 | // Test the feature test macros defined by <cstdlib> |
17 | |
18 | /* Constant Value |
19 | __cpp_lib_constexpr_cmath 202202L [C++23] |
20 | */ |
21 | |
22 | #include <cstdlib> |
23 | #include "test_macros.h" |
24 | |
25 | #if TEST_STD_VER < 14 |
26 | |
27 | # ifdef __cpp_lib_constexpr_cmath |
28 | # error "__cpp_lib_constexpr_cmath should not be defined before c++23" |
29 | # endif |
30 | |
31 | #elif TEST_STD_VER == 14 |
32 | |
33 | # ifdef __cpp_lib_constexpr_cmath |
34 | # error "__cpp_lib_constexpr_cmath should not be defined before c++23" |
35 | # endif |
36 | |
37 | #elif TEST_STD_VER == 17 |
38 | |
39 | # ifdef __cpp_lib_constexpr_cmath |
40 | # error "__cpp_lib_constexpr_cmath should not be defined before c++23" |
41 | # endif |
42 | |
43 | #elif TEST_STD_VER == 20 |
44 | |
45 | # ifdef __cpp_lib_constexpr_cmath |
46 | # error "__cpp_lib_constexpr_cmath should not be defined before c++23" |
47 | # endif |
48 | |
49 | #elif TEST_STD_VER == 23 |
50 | |
51 | # if !defined(_LIBCPP_VERSION) |
52 | # ifndef __cpp_lib_constexpr_cmath |
53 | # error "__cpp_lib_constexpr_cmath should be defined in c++23" |
54 | # endif |
55 | # if __cpp_lib_constexpr_cmath != 202202L |
56 | # error "__cpp_lib_constexpr_cmath should have the value 202202L in c++23" |
57 | # endif |
58 | # else // _LIBCPP_VERSION |
59 | # ifdef __cpp_lib_constexpr_cmath |
60 | # error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!" |
61 | # endif |
62 | # endif |
63 | |
64 | #elif TEST_STD_VER > 23 |
65 | |
66 | # if !defined(_LIBCPP_VERSION) |
67 | # ifndef __cpp_lib_constexpr_cmath |
68 | # error "__cpp_lib_constexpr_cmath should be defined in c++26" |
69 | # endif |
70 | # if __cpp_lib_constexpr_cmath != 202202L |
71 | # error "__cpp_lib_constexpr_cmath should have the value 202202L in c++26" |
72 | # endif |
73 | # else // _LIBCPP_VERSION |
74 | # ifdef __cpp_lib_constexpr_cmath |
75 | # error "__cpp_lib_constexpr_cmath should not be defined because it is unimplemented in libc++!" |
76 | # endif |
77 | # endif |
78 | |
79 | #endif // TEST_STD_VER > 23 |
80 | |
81 | |