functional.version.pass.cpp (7702B)
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 // <functional> 14 15 // Test the feature test macros defined by <functional> 16 17 /* Constant Value 18 __cpp_lib_bind_front 201811L [C++2a] 19 __cpp_lib_boyer_moore_searcher 201603L [C++17] 20 __cpp_lib_constexpr_misc 201811L [C++2a] 21 __cpp_lib_invoke 201411L [C++17] 22 __cpp_lib_not_fn 201603L [C++17] 23 __cpp_lib_ranges 201811L [C++2a] 24 __cpp_lib_result_of_sfinae 201210L [C++14] 25 __cpp_lib_transparent_operators 201210L [C++14] 26 201510L [C++17] 27 */ 28 29 #include <functional> 30 #include "test_macros.h" 31 32 #if TEST_STD_VER < 14 33 34 # ifdef __cpp_lib_bind_front 35 # error "__cpp_lib_bind_front should not be defined before c++2a" 36 # endif 37 38 # ifdef __cpp_lib_boyer_moore_searcher 39 # error "__cpp_lib_boyer_moore_searcher should not be defined before c++17" 40 # endif 41 42 # ifdef __cpp_lib_constexpr_misc 43 # error "__cpp_lib_constexpr_misc should not be defined before c++2a" 44 # endif 45 46 # ifdef __cpp_lib_invoke 47 # error "__cpp_lib_invoke should not be defined before c++17" 48 # endif 49 50 # ifdef __cpp_lib_not_fn 51 # error "__cpp_lib_not_fn should not be defined before c++17" 52 # endif 53 54 # ifdef __cpp_lib_ranges 55 # error "__cpp_lib_ranges should not be defined before c++2a" 56 # endif 57 58 # ifdef __cpp_lib_result_of_sfinae 59 # error "__cpp_lib_result_of_sfinae should not be defined before c++14" 60 # endif 61 62 # ifdef __cpp_lib_transparent_operators 63 # error "__cpp_lib_transparent_operators should not be defined before c++14" 64 # endif 65 66 #elif TEST_STD_VER == 14 67 68 # ifdef __cpp_lib_bind_front 69 # error "__cpp_lib_bind_front should not be defined before c++2a" 70 # endif 71 72 # ifdef __cpp_lib_boyer_moore_searcher 73 # error "__cpp_lib_boyer_moore_searcher should not be defined before c++17" 74 # endif 75 76 # ifdef __cpp_lib_constexpr_misc 77 # error "__cpp_lib_constexpr_misc should not be defined before c++2a" 78 # endif 79 80 # ifdef __cpp_lib_invoke 81 # error "__cpp_lib_invoke should not be defined before c++17" 82 # endif 83 84 # ifdef __cpp_lib_not_fn 85 # error "__cpp_lib_not_fn should not be defined before c++17" 86 # endif 87 88 # ifdef __cpp_lib_ranges 89 # error "__cpp_lib_ranges should not be defined before c++2a" 90 # endif 91 92 # ifndef __cpp_lib_result_of_sfinae 93 # error "__cpp_lib_result_of_sfinae should be defined in c++14" 94 # endif 95 # if __cpp_lib_result_of_sfinae != 201210L 96 # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++14" 97 # endif 98 99 # ifndef __cpp_lib_transparent_operators 100 # error "__cpp_lib_transparent_operators should be defined in c++14" 101 # endif 102 # if __cpp_lib_transparent_operators != 201210L 103 # error "__cpp_lib_transparent_operators should have the value 201210L in c++14" 104 # endif 105 106 #elif TEST_STD_VER == 17 107 108 # ifdef __cpp_lib_bind_front 109 # error "__cpp_lib_bind_front should not be defined before c++2a" 110 # endif 111 112 # if !defined(_LIBCPP_VERSION) 113 # ifndef __cpp_lib_boyer_moore_searcher 114 # error "__cpp_lib_boyer_moore_searcher should be defined in c++17" 115 # endif 116 # if __cpp_lib_boyer_moore_searcher != 201603L 117 # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++17" 118 # endif 119 # else // _LIBCPP_VERSION 120 # ifdef __cpp_lib_boyer_moore_searcher 121 # error "__cpp_lib_boyer_moore_searcher should not be defined because it is unimplemented in libc++!" 122 # endif 123 # endif 124 125 # ifdef __cpp_lib_constexpr_misc 126 # error "__cpp_lib_constexpr_misc should not be defined before c++2a" 127 # endif 128 129 # ifndef __cpp_lib_invoke 130 # error "__cpp_lib_invoke should be defined in c++17" 131 # endif 132 # if __cpp_lib_invoke != 201411L 133 # error "__cpp_lib_invoke should have the value 201411L in c++17" 134 # endif 135 136 # ifndef __cpp_lib_not_fn 137 # error "__cpp_lib_not_fn should be defined in c++17" 138 # endif 139 # if __cpp_lib_not_fn != 201603L 140 # error "__cpp_lib_not_fn should have the value 201603L in c++17" 141 # endif 142 143 # ifdef __cpp_lib_ranges 144 # error "__cpp_lib_ranges should not be defined before c++2a" 145 # endif 146 147 # ifndef __cpp_lib_result_of_sfinae 148 # error "__cpp_lib_result_of_sfinae should be defined in c++17" 149 # endif 150 # if __cpp_lib_result_of_sfinae != 201210L 151 # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++17" 152 # endif 153 154 # ifndef __cpp_lib_transparent_operators 155 # error "__cpp_lib_transparent_operators should be defined in c++17" 156 # endif 157 # if __cpp_lib_transparent_operators != 201510L 158 # error "__cpp_lib_transparent_operators should have the value 201510L in c++17" 159 # endif 160 161 #elif TEST_STD_VER > 17 162 163 # if !defined(_LIBCPP_VERSION) 164 # ifndef __cpp_lib_bind_front 165 # error "__cpp_lib_bind_front should be defined in c++2a" 166 # endif 167 # if __cpp_lib_bind_front != 201811L 168 # error "__cpp_lib_bind_front should have the value 201811L in c++2a" 169 # endif 170 # else // _LIBCPP_VERSION 171 # ifdef __cpp_lib_bind_front 172 # error "__cpp_lib_bind_front should not be defined because it is unimplemented in libc++!" 173 # endif 174 # endif 175 176 # if !defined(_LIBCPP_VERSION) 177 # ifndef __cpp_lib_boyer_moore_searcher 178 # error "__cpp_lib_boyer_moore_searcher should be defined in c++2a" 179 # endif 180 # if __cpp_lib_boyer_moore_searcher != 201603L 181 # error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++2a" 182 # endif 183 # else // _LIBCPP_VERSION 184 # ifdef __cpp_lib_boyer_moore_searcher 185 # error "__cpp_lib_boyer_moore_searcher should not be defined because it is unimplemented in libc++!" 186 # endif 187 # endif 188 189 # if !defined(_LIBCPP_VERSION) 190 # ifndef __cpp_lib_constexpr_misc 191 # error "__cpp_lib_constexpr_misc should be defined in c++2a" 192 # endif 193 # if __cpp_lib_constexpr_misc != 201811L 194 # error "__cpp_lib_constexpr_misc should have the value 201811L in c++2a" 195 # endif 196 # else // _LIBCPP_VERSION 197 # ifdef __cpp_lib_constexpr_misc 198 # error "__cpp_lib_constexpr_misc should not be defined because it is unimplemented in libc++!" 199 # endif 200 # endif 201 202 # ifndef __cpp_lib_invoke 203 # error "__cpp_lib_invoke should be defined in c++2a" 204 # endif 205 # if __cpp_lib_invoke != 201411L 206 # error "__cpp_lib_invoke should have the value 201411L in c++2a" 207 # endif 208 209 # ifndef __cpp_lib_not_fn 210 # error "__cpp_lib_not_fn should be defined in c++2a" 211 # endif 212 # if __cpp_lib_not_fn != 201603L 213 # error "__cpp_lib_not_fn should have the value 201603L in c++2a" 214 # endif 215 216 # if !defined(_LIBCPP_VERSION) 217 # ifndef __cpp_lib_ranges 218 # error "__cpp_lib_ranges should be defined in c++2a" 219 # endif 220 # if __cpp_lib_ranges != 201811L 221 # error "__cpp_lib_ranges should have the value 201811L in c++2a" 222 # endif 223 # else // _LIBCPP_VERSION 224 # ifdef __cpp_lib_ranges 225 # error "__cpp_lib_ranges should not be defined because it is unimplemented in libc++!" 226 # endif 227 # endif 228 229 # ifndef __cpp_lib_result_of_sfinae 230 # error "__cpp_lib_result_of_sfinae should be defined in c++2a" 231 # endif 232 # if __cpp_lib_result_of_sfinae != 201210L 233 # error "__cpp_lib_result_of_sfinae should have the value 201210L in c++2a" 234 # endif 235 236 # ifndef __cpp_lib_transparent_operators 237 # error "__cpp_lib_transparent_operators should be defined in c++2a" 238 # endif 239 # if __cpp_lib_transparent_operators != 201510L 240 # error "__cpp_lib_transparent_operators should have the value 201510L in c++2a" 241 # endif 242 243 #endif // TEST_STD_VER > 17 244 245 int main() {}