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 | // <complex> |
15 | |
16 | // Test the feature test macros defined by <complex> |
17 | |
18 | /* Constant Value |
19 | __cpp_lib_complex_udls 201309L [C++14] |
20 | __cpp_lib_constexpr_complex 201711L [C++20] |
21 | */ |
22 | |
23 | #include <complex> |
24 | #include "test_macros.h" |
25 | |
26 | #if TEST_STD_VER < 14 |
27 | |
28 | # ifdef __cpp_lib_complex_udls |
29 | # error "__cpp_lib_complex_udls should not be defined before c++14" |
30 | # endif |
31 | |
32 | # ifdef __cpp_lib_constexpr_complex |
33 | # error "__cpp_lib_constexpr_complex should not be defined before c++20" |
34 | # endif |
35 | |
36 | #elif TEST_STD_VER == 14 |
37 | |
38 | # ifndef __cpp_lib_complex_udls |
39 | # error "__cpp_lib_complex_udls should be defined in c++14" |
40 | # endif |
41 | # if __cpp_lib_complex_udls != 201309L |
42 | # error "__cpp_lib_complex_udls should have the value 201309L in c++14" |
43 | # endif |
44 | |
45 | # ifdef __cpp_lib_constexpr_complex |
46 | # error "__cpp_lib_constexpr_complex should not be defined before c++20" |
47 | # endif |
48 | |
49 | #elif TEST_STD_VER == 17 |
50 | |
51 | # ifndef __cpp_lib_complex_udls |
52 | # error "__cpp_lib_complex_udls should be defined in c++17" |
53 | # endif |
54 | # if __cpp_lib_complex_udls != 201309L |
55 | # error "__cpp_lib_complex_udls should have the value 201309L in c++17" |
56 | # endif |
57 | |
58 | # ifdef __cpp_lib_constexpr_complex |
59 | # error "__cpp_lib_constexpr_complex should not be defined before c++20" |
60 | # endif |
61 | |
62 | #elif TEST_STD_VER == 20 |
63 | |
64 | # ifndef __cpp_lib_complex_udls |
65 | # error "__cpp_lib_complex_udls should be defined in c++20" |
66 | # endif |
67 | # if __cpp_lib_complex_udls != 201309L |
68 | # error "__cpp_lib_complex_udls should have the value 201309L in c++20" |
69 | # endif |
70 | |
71 | # ifndef __cpp_lib_constexpr_complex |
72 | # error "__cpp_lib_constexpr_complex should be defined in c++20" |
73 | # endif |
74 | # if __cpp_lib_constexpr_complex != 201711L |
75 | # error "__cpp_lib_constexpr_complex should have the value 201711L in c++20" |
76 | # endif |
77 | |
78 | #elif TEST_STD_VER == 23 |
79 | |
80 | # ifndef __cpp_lib_complex_udls |
81 | # error "__cpp_lib_complex_udls should be defined in c++23" |
82 | # endif |
83 | # if __cpp_lib_complex_udls != 201309L |
84 | # error "__cpp_lib_complex_udls should have the value 201309L in c++23" |
85 | # endif |
86 | |
87 | # ifndef __cpp_lib_constexpr_complex |
88 | # error "__cpp_lib_constexpr_complex should be defined in c++23" |
89 | # endif |
90 | # if __cpp_lib_constexpr_complex != 201711L |
91 | # error "__cpp_lib_constexpr_complex should have the value 201711L in c++23" |
92 | # endif |
93 | |
94 | #elif TEST_STD_VER > 23 |
95 | |
96 | # ifndef __cpp_lib_complex_udls |
97 | # error "__cpp_lib_complex_udls should be defined in c++26" |
98 | # endif |
99 | # if __cpp_lib_complex_udls != 201309L |
100 | # error "__cpp_lib_complex_udls should have the value 201309L in c++26" |
101 | # endif |
102 | |
103 | # ifndef __cpp_lib_constexpr_complex |
104 | # error "__cpp_lib_constexpr_complex should be defined in c++26" |
105 | # endif |
106 | # if __cpp_lib_constexpr_complex != 201711L |
107 | # error "__cpp_lib_constexpr_complex should have the value 201711L in c++26" |
108 | # endif |
109 | |
110 | #endif // TEST_STD_VER > 23 |
111 | |
112 | |