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

source code of libcxx/test/std/language.support/support.limits/support.limits.general/complex.version.compile.pass.cpp