tuple.version.pass.cpp (4735B)
1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // WARNING: This test was generated by generate_feature_test_macro_components.py 11 // and should not be edited manually. 12 13 // <tuple> 14 15 // Test the feature test macros defined by <tuple> 16 17 /* Constant Value 18 __cpp_lib_apply 201603L [C++17] 19 __cpp_lib_constexpr_misc 201811L [C++2a] 20 __cpp_lib_make_from_tuple 201606L [C++17] 21 __cpp_lib_tuple_element_t 201402L [C++14] 22 __cpp_lib_tuples_by_type 201304L [C++14] 23 */ 24 25 #include <tuple> 26 #include "test_macros.h" 27 28 #if TEST_STD_VER < 14 29 30 # ifdef __cpp_lib_apply 31 # error "__cpp_lib_apply should not be defined before c++17" 32 # endif 33 34 # ifdef __cpp_lib_constexpr_misc 35 # error "__cpp_lib_constexpr_misc should not be defined before c++2a" 36 # endif 37 38 # ifdef __cpp_lib_make_from_tuple 39 # error "__cpp_lib_make_from_tuple should not be defined before c++17" 40 # endif 41 42 # ifdef __cpp_lib_tuple_element_t 43 # error "__cpp_lib_tuple_element_t should not be defined before c++14" 44 # endif 45 46 # ifdef __cpp_lib_tuples_by_type 47 # error "__cpp_lib_tuples_by_type should not be defined before c++14" 48 # endif 49 50 #elif TEST_STD_VER == 14 51 52 # ifdef __cpp_lib_apply 53 # error "__cpp_lib_apply should not be defined before c++17" 54 # endif 55 56 # ifdef __cpp_lib_constexpr_misc 57 # error "__cpp_lib_constexpr_misc should not be defined before c++2a" 58 # endif 59 60 # ifdef __cpp_lib_make_from_tuple 61 # error "__cpp_lib_make_from_tuple should not be defined before c++17" 62 # endif 63 64 # ifndef __cpp_lib_tuple_element_t 65 # error "__cpp_lib_tuple_element_t should be defined in c++14" 66 # endif 67 # if __cpp_lib_tuple_element_t != 201402L 68 # error "__cpp_lib_tuple_element_t should have the value 201402L in c++14" 69 # endif 70 71 # ifndef __cpp_lib_tuples_by_type 72 # error "__cpp_lib_tuples_by_type should be defined in c++14" 73 # endif 74 # if __cpp_lib_tuples_by_type != 201304L 75 # error "__cpp_lib_tuples_by_type should have the value 201304L in c++14" 76 # endif 77 78 #elif TEST_STD_VER == 17 79 80 # ifndef __cpp_lib_apply 81 # error "__cpp_lib_apply should be defined in c++17" 82 # endif 83 # if __cpp_lib_apply != 201603L 84 # error "__cpp_lib_apply should have the value 201603L in c++17" 85 # endif 86 87 # ifdef __cpp_lib_constexpr_misc 88 # error "__cpp_lib_constexpr_misc should not be defined before c++2a" 89 # endif 90 91 # ifndef __cpp_lib_make_from_tuple 92 # error "__cpp_lib_make_from_tuple should be defined in c++17" 93 # endif 94 # if __cpp_lib_make_from_tuple != 201606L 95 # error "__cpp_lib_make_from_tuple should have the value 201606L in c++17" 96 # endif 97 98 # ifndef __cpp_lib_tuple_element_t 99 # error "__cpp_lib_tuple_element_t should be defined in c++17" 100 # endif 101 # if __cpp_lib_tuple_element_t != 201402L 102 # error "__cpp_lib_tuple_element_t should have the value 201402L in c++17" 103 # endif 104 105 # ifndef __cpp_lib_tuples_by_type 106 # error "__cpp_lib_tuples_by_type should be defined in c++17" 107 # endif 108 # if __cpp_lib_tuples_by_type != 201304L 109 # error "__cpp_lib_tuples_by_type should have the value 201304L in c++17" 110 # endif 111 112 #elif TEST_STD_VER > 17 113 114 # ifndef __cpp_lib_apply 115 # error "__cpp_lib_apply should be defined in c++2a" 116 # endif 117 # if __cpp_lib_apply != 201603L 118 # error "__cpp_lib_apply should have the value 201603L in c++2a" 119 # endif 120 121 # if !defined(_LIBCPP_VERSION) 122 # ifndef __cpp_lib_constexpr_misc 123 # error "__cpp_lib_constexpr_misc should be defined in c++2a" 124 # endif 125 # if __cpp_lib_constexpr_misc != 201811L 126 # error "__cpp_lib_constexpr_misc should have the value 201811L in c++2a" 127 # endif 128 # else // _LIBCPP_VERSION 129 # ifdef __cpp_lib_constexpr_misc 130 # error "__cpp_lib_constexpr_misc should not be defined because it is unimplemented in libc++!" 131 # endif 132 # endif 133 134 # ifndef __cpp_lib_make_from_tuple 135 # error "__cpp_lib_make_from_tuple should be defined in c++2a" 136 # endif 137 # if __cpp_lib_make_from_tuple != 201606L 138 # error "__cpp_lib_make_from_tuple should have the value 201606L in c++2a" 139 # endif 140 141 # ifndef __cpp_lib_tuple_element_t 142 # error "__cpp_lib_tuple_element_t should be defined in c++2a" 143 # endif 144 # if __cpp_lib_tuple_element_t != 201402L 145 # error "__cpp_lib_tuple_element_t should have the value 201402L in c++2a" 146 # endif 147 148 # ifndef __cpp_lib_tuples_by_type 149 # error "__cpp_lib_tuples_by_type should be defined in c++2a" 150 # endif 151 # if __cpp_lib_tuples_by_type != 201304L 152 # error "__cpp_lib_tuples_by_type should have the value 201304L in c++2a" 153 # endif 154 155 #endif // TEST_STD_VER > 17 156 157 int main() {}