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 // <stack> 15 16 // Test the feature test macros defined by <stack> 17 18 /* Constant Value 19 __cpp_lib_adaptor_iterator_pair_constructor 202106L [C++2b] 20 __cpp_lib_ranges_to_container 202202L [C++2b] 21 */ 22 23 #include <stack> 24 #include "test_macros.h" 25 26 #if TEST_STD_VER < 14 27 28 # ifdef __cpp_lib_adaptor_iterator_pair_constructor 29 # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" 30 # endif 31 32 # ifdef __cpp_lib_ranges_to_container 33 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 34 # endif 35 36 #elif TEST_STD_VER == 14 37 38 # ifdef __cpp_lib_adaptor_iterator_pair_constructor 39 # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" 40 # endif 41 42 # ifdef __cpp_lib_ranges_to_container 43 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 44 # endif 45 46 #elif TEST_STD_VER == 17 47 48 # ifdef __cpp_lib_adaptor_iterator_pair_constructor 49 # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" 50 # endif 51 52 # ifdef __cpp_lib_ranges_to_container 53 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 54 # endif 55 56 #elif TEST_STD_VER == 20 57 58 # ifdef __cpp_lib_adaptor_iterator_pair_constructor 59 # error "__cpp_lib_adaptor_iterator_pair_constructor should not be defined before c++2b" 60 # endif 61 62 # ifdef __cpp_lib_ranges_to_container 63 # error "__cpp_lib_ranges_to_container should not be defined before c++2b" 64 # endif 65 66 #elif TEST_STD_VER > 20 67 68 # ifndef __cpp_lib_adaptor_iterator_pair_constructor 69 # error "__cpp_lib_adaptor_iterator_pair_constructor should be defined in c++2b" 70 # endif 71 # if __cpp_lib_adaptor_iterator_pair_constructor != 202106L 72 # error "__cpp_lib_adaptor_iterator_pair_constructor should have the value 202106L in c++2b" 73 # endif 74 75 # if !defined(_LIBCPP_VERSION) 76 # ifndef __cpp_lib_ranges_to_container 77 # error "__cpp_lib_ranges_to_container should be defined in c++2b" 78 # endif 79 # if __cpp_lib_ranges_to_container != 202202L 80 # error "__cpp_lib_ranges_to_container should have the value 202202L in c++2b" 81 # endif 82 # else // _LIBCPP_VERSION 83 # ifdef __cpp_lib_ranges_to_container 84 # error "__cpp_lib_ranges_to_container should not be defined because it is unimplemented in libc++!" 85 # endif 86 # endif 87 88 #endif // TEST_STD_VER > 20 89 90