brintos

brintos / llvm-project-archived public Read only

0
0
Text · 18.0 KiB · b7b7d03 Raw
582 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9// WARNING: This test was generated by generate_feature_test_macro_components.py10// and should not be edited manually.11 12// <functional>13 14// Test the feature test macros defined by <functional>15 16// clang-format off17 18#include <functional>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23#  ifdef __cpp_lib_bind_back24#    error "__cpp_lib_bind_back should not be defined before c++23"25#  endif26 27#  ifdef __cpp_lib_bind_front28#    error "__cpp_lib_bind_front should not be defined before c++20"29#  endif30 31#  ifdef __cpp_lib_boyer_moore_searcher32#    error "__cpp_lib_boyer_moore_searcher should not be defined before c++17"33#  endif34 35#  ifdef __cpp_lib_common_reference_wrapper36#    error "__cpp_lib_common_reference_wrapper should not be defined before c++20"37#  endif38 39#  ifdef __cpp_lib_constexpr_functional40#    error "__cpp_lib_constexpr_functional should not be defined before c++20"41#  endif42 43#  ifdef __cpp_lib_copyable_function44#    error "__cpp_lib_copyable_function should not be defined before c++26"45#  endif46 47#  ifdef __cpp_lib_function_ref48#    error "__cpp_lib_function_ref should not be defined before c++26"49#  endif50 51#  ifdef __cpp_lib_invoke52#    error "__cpp_lib_invoke should not be defined before c++17"53#  endif54 55#  ifdef __cpp_lib_invoke_r56#    error "__cpp_lib_invoke_r should not be defined before c++23"57#  endif58 59#  ifdef __cpp_lib_move_only_function60#    error "__cpp_lib_move_only_function should not be defined before c++23"61#  endif62 63#  ifdef __cpp_lib_not_fn64#    error "__cpp_lib_not_fn should not be defined before c++17"65#  endif66 67#  ifdef __cpp_lib_ranges68#    error "__cpp_lib_ranges should not be defined before c++20"69#  endif70 71#  ifdef __cpp_lib_reference_wrapper72#    error "__cpp_lib_reference_wrapper should not be defined before c++26"73#  endif74 75#  ifdef __cpp_lib_result_of_sfinae76#    error "__cpp_lib_result_of_sfinae should not be defined before c++14"77#  endif78 79#  ifdef __cpp_lib_transparent_operators80#    error "__cpp_lib_transparent_operators should not be defined before c++14"81#  endif82 83#  ifdef __cpp_lib_unwrap_ref84#    error "__cpp_lib_unwrap_ref should not be defined before c++20"85#  endif86 87#elif TEST_STD_VER == 1488 89#  ifdef __cpp_lib_bind_back90#    error "__cpp_lib_bind_back should not be defined before c++23"91#  endif92 93#  ifdef __cpp_lib_bind_front94#    error "__cpp_lib_bind_front should not be defined before c++20"95#  endif96 97#  ifdef __cpp_lib_boyer_moore_searcher98#    error "__cpp_lib_boyer_moore_searcher should not be defined before c++17"99#  endif100 101#  ifdef __cpp_lib_common_reference_wrapper102#    error "__cpp_lib_common_reference_wrapper should not be defined before c++20"103#  endif104 105#  ifdef __cpp_lib_constexpr_functional106#    error "__cpp_lib_constexpr_functional should not be defined before c++20"107#  endif108 109#  ifdef __cpp_lib_copyable_function110#    error "__cpp_lib_copyable_function should not be defined before c++26"111#  endif112 113#  ifdef __cpp_lib_function_ref114#    error "__cpp_lib_function_ref should not be defined before c++26"115#  endif116 117#  ifdef __cpp_lib_invoke118#    error "__cpp_lib_invoke should not be defined before c++17"119#  endif120 121#  ifdef __cpp_lib_invoke_r122#    error "__cpp_lib_invoke_r should not be defined before c++23"123#  endif124 125#  ifdef __cpp_lib_move_only_function126#    error "__cpp_lib_move_only_function should not be defined before c++23"127#  endif128 129#  ifdef __cpp_lib_not_fn130#    error "__cpp_lib_not_fn should not be defined before c++17"131#  endif132 133#  ifdef __cpp_lib_ranges134#    error "__cpp_lib_ranges should not be defined before c++20"135#  endif136 137#  ifdef __cpp_lib_reference_wrapper138#    error "__cpp_lib_reference_wrapper should not be defined before c++26"139#  endif140 141#  ifndef __cpp_lib_result_of_sfinae142#    error "__cpp_lib_result_of_sfinae should be defined in c++14"143#  endif144#  if __cpp_lib_result_of_sfinae != 201210L145#    error "__cpp_lib_result_of_sfinae should have the value 201210L in c++14"146#  endif147 148#  ifndef __cpp_lib_transparent_operators149#    error "__cpp_lib_transparent_operators should be defined in c++14"150#  endif151#  if __cpp_lib_transparent_operators != 201210L152#    error "__cpp_lib_transparent_operators should have the value 201210L in c++14"153#  endif154 155#  ifdef __cpp_lib_unwrap_ref156#    error "__cpp_lib_unwrap_ref should not be defined before c++20"157#  endif158 159#elif TEST_STD_VER == 17160 161#  ifdef __cpp_lib_bind_back162#    error "__cpp_lib_bind_back should not be defined before c++23"163#  endif164 165#  ifdef __cpp_lib_bind_front166#    error "__cpp_lib_bind_front should not be defined before c++20"167#  endif168 169#  ifndef __cpp_lib_boyer_moore_searcher170#    error "__cpp_lib_boyer_moore_searcher should be defined in c++17"171#  endif172#  if __cpp_lib_boyer_moore_searcher != 201603L173#    error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++17"174#  endif175 176#  ifdef __cpp_lib_common_reference_wrapper177#    error "__cpp_lib_common_reference_wrapper should not be defined before c++20"178#  endif179 180#  ifdef __cpp_lib_constexpr_functional181#    error "__cpp_lib_constexpr_functional should not be defined before c++20"182#  endif183 184#  ifdef __cpp_lib_copyable_function185#    error "__cpp_lib_copyable_function should not be defined before c++26"186#  endif187 188#  ifdef __cpp_lib_function_ref189#    error "__cpp_lib_function_ref should not be defined before c++26"190#  endif191 192#  ifndef __cpp_lib_invoke193#    error "__cpp_lib_invoke should be defined in c++17"194#  endif195#  if __cpp_lib_invoke != 201411L196#    error "__cpp_lib_invoke should have the value 201411L in c++17"197#  endif198 199#  ifdef __cpp_lib_invoke_r200#    error "__cpp_lib_invoke_r should not be defined before c++23"201#  endif202 203#  ifdef __cpp_lib_move_only_function204#    error "__cpp_lib_move_only_function should not be defined before c++23"205#  endif206 207#  ifndef __cpp_lib_not_fn208#    error "__cpp_lib_not_fn should be defined in c++17"209#  endif210#  if __cpp_lib_not_fn != 201603L211#    error "__cpp_lib_not_fn should have the value 201603L in c++17"212#  endif213 214#  ifdef __cpp_lib_ranges215#    error "__cpp_lib_ranges should not be defined before c++20"216#  endif217 218#  ifdef __cpp_lib_reference_wrapper219#    error "__cpp_lib_reference_wrapper should not be defined before c++26"220#  endif221 222#  ifndef __cpp_lib_result_of_sfinae223#    error "__cpp_lib_result_of_sfinae should be defined in c++17"224#  endif225#  if __cpp_lib_result_of_sfinae != 201210L226#    error "__cpp_lib_result_of_sfinae should have the value 201210L in c++17"227#  endif228 229#  ifndef __cpp_lib_transparent_operators230#    error "__cpp_lib_transparent_operators should be defined in c++17"231#  endif232#  if __cpp_lib_transparent_operators != 201510L233#    error "__cpp_lib_transparent_operators should have the value 201510L in c++17"234#  endif235 236#  ifdef __cpp_lib_unwrap_ref237#    error "__cpp_lib_unwrap_ref should not be defined before c++20"238#  endif239 240#elif TEST_STD_VER == 20241 242#  ifdef __cpp_lib_bind_back243#    error "__cpp_lib_bind_back should not be defined before c++23"244#  endif245 246#  ifndef __cpp_lib_bind_front247#    error "__cpp_lib_bind_front should be defined in c++20"248#  endif249#  if __cpp_lib_bind_front != 201907L250#    error "__cpp_lib_bind_front should have the value 201907L in c++20"251#  endif252 253#  ifndef __cpp_lib_boyer_moore_searcher254#    error "__cpp_lib_boyer_moore_searcher should be defined in c++20"255#  endif256#  if __cpp_lib_boyer_moore_searcher != 201603L257#    error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++20"258#  endif259 260#  ifndef __cpp_lib_common_reference_wrapper261#    error "__cpp_lib_common_reference_wrapper should be defined in c++20"262#  endif263#  if __cpp_lib_common_reference_wrapper != 202302L264#    error "__cpp_lib_common_reference_wrapper should have the value 202302L in c++20"265#  endif266 267#  ifndef __cpp_lib_constexpr_functional268#    error "__cpp_lib_constexpr_functional should be defined in c++20"269#  endif270#  if __cpp_lib_constexpr_functional != 201907L271#    error "__cpp_lib_constexpr_functional should have the value 201907L in c++20"272#  endif273 274#  ifdef __cpp_lib_copyable_function275#    error "__cpp_lib_copyable_function should not be defined before c++26"276#  endif277 278#  ifdef __cpp_lib_function_ref279#    error "__cpp_lib_function_ref should not be defined before c++26"280#  endif281 282#  ifndef __cpp_lib_invoke283#    error "__cpp_lib_invoke should be defined in c++20"284#  endif285#  if __cpp_lib_invoke != 201411L286#    error "__cpp_lib_invoke should have the value 201411L in c++20"287#  endif288 289#  ifdef __cpp_lib_invoke_r290#    error "__cpp_lib_invoke_r should not be defined before c++23"291#  endif292 293#  ifdef __cpp_lib_move_only_function294#    error "__cpp_lib_move_only_function should not be defined before c++23"295#  endif296 297#  ifndef __cpp_lib_not_fn298#    error "__cpp_lib_not_fn should be defined in c++20"299#  endif300#  if __cpp_lib_not_fn != 201603L301#    error "__cpp_lib_not_fn should have the value 201603L in c++20"302#  endif303 304#  ifndef __cpp_lib_ranges305#    error "__cpp_lib_ranges should be defined in c++20"306#  endif307#  if __cpp_lib_ranges != 202110L308#    error "__cpp_lib_ranges should have the value 202110L in c++20"309#  endif310 311#  ifdef __cpp_lib_reference_wrapper312#    error "__cpp_lib_reference_wrapper should not be defined before c++26"313#  endif314 315#  ifndef __cpp_lib_result_of_sfinae316#    error "__cpp_lib_result_of_sfinae should be defined in c++20"317#  endif318#  if __cpp_lib_result_of_sfinae != 201210L319#    error "__cpp_lib_result_of_sfinae should have the value 201210L in c++20"320#  endif321 322#  ifndef __cpp_lib_transparent_operators323#    error "__cpp_lib_transparent_operators should be defined in c++20"324#  endif325#  if __cpp_lib_transparent_operators != 201510L326#    error "__cpp_lib_transparent_operators should have the value 201510L in c++20"327#  endif328 329#  ifndef __cpp_lib_unwrap_ref330#    error "__cpp_lib_unwrap_ref should be defined in c++20"331#  endif332#  if __cpp_lib_unwrap_ref != 201811L333#    error "__cpp_lib_unwrap_ref should have the value 201811L in c++20"334#  endif335 336#elif TEST_STD_VER == 23337 338#  ifndef __cpp_lib_bind_back339#    error "__cpp_lib_bind_back should be defined in c++23"340#  endif341#  if __cpp_lib_bind_back != 202202L342#    error "__cpp_lib_bind_back should have the value 202202L in c++23"343#  endif344 345#  ifndef __cpp_lib_bind_front346#    error "__cpp_lib_bind_front should be defined in c++23"347#  endif348#  if __cpp_lib_bind_front != 201907L349#    error "__cpp_lib_bind_front should have the value 201907L in c++23"350#  endif351 352#  ifndef __cpp_lib_boyer_moore_searcher353#    error "__cpp_lib_boyer_moore_searcher should be defined in c++23"354#  endif355#  if __cpp_lib_boyer_moore_searcher != 201603L356#    error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++23"357#  endif358 359#  ifndef __cpp_lib_common_reference_wrapper360#    error "__cpp_lib_common_reference_wrapper should be defined in c++23"361#  endif362#  if __cpp_lib_common_reference_wrapper != 202302L363#    error "__cpp_lib_common_reference_wrapper should have the value 202302L in c++23"364#  endif365 366#  ifndef __cpp_lib_constexpr_functional367#    error "__cpp_lib_constexpr_functional should be defined in c++23"368#  endif369#  if __cpp_lib_constexpr_functional != 201907L370#    error "__cpp_lib_constexpr_functional should have the value 201907L in c++23"371#  endif372 373#  ifdef __cpp_lib_copyable_function374#    error "__cpp_lib_copyable_function should not be defined before c++26"375#  endif376 377#  ifdef __cpp_lib_function_ref378#    error "__cpp_lib_function_ref should not be defined before c++26"379#  endif380 381#  ifndef __cpp_lib_invoke382#    error "__cpp_lib_invoke should be defined in c++23"383#  endif384#  if __cpp_lib_invoke != 201411L385#    error "__cpp_lib_invoke should have the value 201411L in c++23"386#  endif387 388#  ifndef __cpp_lib_invoke_r389#    error "__cpp_lib_invoke_r should be defined in c++23"390#  endif391#  if __cpp_lib_invoke_r != 202106L392#    error "__cpp_lib_invoke_r should have the value 202106L in c++23"393#  endif394 395#  if !defined(_LIBCPP_VERSION)396#    ifndef __cpp_lib_move_only_function397#      error "__cpp_lib_move_only_function should be defined in c++23"398#    endif399#    if __cpp_lib_move_only_function != 202110L400#      error "__cpp_lib_move_only_function should have the value 202110L in c++23"401#    endif402#  else403#    ifdef __cpp_lib_move_only_function404#      error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!"405#    endif406#  endif407 408#  ifndef __cpp_lib_not_fn409#    error "__cpp_lib_not_fn should be defined in c++23"410#  endif411#  if __cpp_lib_not_fn != 201603L412#    error "__cpp_lib_not_fn should have the value 201603L in c++23"413#  endif414 415#  ifndef __cpp_lib_ranges416#    error "__cpp_lib_ranges should be defined in c++23"417#  endif418#  if __cpp_lib_ranges != 202406L419#    error "__cpp_lib_ranges should have the value 202406L in c++23"420#  endif421 422#  ifdef __cpp_lib_reference_wrapper423#    error "__cpp_lib_reference_wrapper should not be defined before c++26"424#  endif425 426#  ifndef __cpp_lib_result_of_sfinae427#    error "__cpp_lib_result_of_sfinae should be defined in c++23"428#  endif429#  if __cpp_lib_result_of_sfinae != 201210L430#    error "__cpp_lib_result_of_sfinae should have the value 201210L in c++23"431#  endif432 433#  ifndef __cpp_lib_transparent_operators434#    error "__cpp_lib_transparent_operators should be defined in c++23"435#  endif436#  if __cpp_lib_transparent_operators != 201510L437#    error "__cpp_lib_transparent_operators should have the value 201510L in c++23"438#  endif439 440#  ifndef __cpp_lib_unwrap_ref441#    error "__cpp_lib_unwrap_ref should be defined in c++23"442#  endif443#  if __cpp_lib_unwrap_ref != 201811L444#    error "__cpp_lib_unwrap_ref should have the value 201811L in c++23"445#  endif446 447#elif TEST_STD_VER > 23448 449#  ifndef __cpp_lib_bind_back450#    error "__cpp_lib_bind_back should be defined in c++26"451#  endif452#  if __cpp_lib_bind_back != 202202L453#    error "__cpp_lib_bind_back should have the value 202202L in c++26"454#  endif455 456#  ifndef __cpp_lib_bind_front457#    error "__cpp_lib_bind_front should be defined in c++26"458#  endif459#  if __cpp_lib_bind_front != 202306L460#    error "__cpp_lib_bind_front should have the value 202306L in c++26"461#  endif462 463#  ifndef __cpp_lib_boyer_moore_searcher464#    error "__cpp_lib_boyer_moore_searcher should be defined in c++26"465#  endif466#  if __cpp_lib_boyer_moore_searcher != 201603L467#    error "__cpp_lib_boyer_moore_searcher should have the value 201603L in c++26"468#  endif469 470#  ifndef __cpp_lib_common_reference_wrapper471#    error "__cpp_lib_common_reference_wrapper should be defined in c++26"472#  endif473#  if __cpp_lib_common_reference_wrapper != 202302L474#    error "__cpp_lib_common_reference_wrapper should have the value 202302L in c++26"475#  endif476 477#  ifndef __cpp_lib_constexpr_functional478#    error "__cpp_lib_constexpr_functional should be defined in c++26"479#  endif480#  if __cpp_lib_constexpr_functional != 201907L481#    error "__cpp_lib_constexpr_functional should have the value 201907L in c++26"482#  endif483 484#  if !defined(_LIBCPP_VERSION)485#    ifndef __cpp_lib_copyable_function486#      error "__cpp_lib_copyable_function should be defined in c++26"487#    endif488#    if __cpp_lib_copyable_function != 202306L489#      error "__cpp_lib_copyable_function should have the value 202306L in c++26"490#    endif491#  else492#    ifdef __cpp_lib_copyable_function493#      error "__cpp_lib_copyable_function should not be defined because it is unimplemented in libc++!"494#    endif495#  endif496 497#  if !defined(_LIBCPP_VERSION)498#    ifndef __cpp_lib_function_ref499#      error "__cpp_lib_function_ref should be defined in c++26"500#    endif501#    if __cpp_lib_function_ref != 202306L502#      error "__cpp_lib_function_ref should have the value 202306L in c++26"503#    endif504#  else505#    ifdef __cpp_lib_function_ref506#      error "__cpp_lib_function_ref should not be defined because it is unimplemented in libc++!"507#    endif508#  endif509 510#  ifndef __cpp_lib_invoke511#    error "__cpp_lib_invoke should be defined in c++26"512#  endif513#  if __cpp_lib_invoke != 201411L514#    error "__cpp_lib_invoke should have the value 201411L in c++26"515#  endif516 517#  ifndef __cpp_lib_invoke_r518#    error "__cpp_lib_invoke_r should be defined in c++26"519#  endif520#  if __cpp_lib_invoke_r != 202106L521#    error "__cpp_lib_invoke_r should have the value 202106L in c++26"522#  endif523 524#  if !defined(_LIBCPP_VERSION)525#    ifndef __cpp_lib_move_only_function526#      error "__cpp_lib_move_only_function should be defined in c++26"527#    endif528#    if __cpp_lib_move_only_function != 202110L529#      error "__cpp_lib_move_only_function should have the value 202110L in c++26"530#    endif531#  else532#    ifdef __cpp_lib_move_only_function533#      error "__cpp_lib_move_only_function should not be defined because it is unimplemented in libc++!"534#    endif535#  endif536 537#  ifndef __cpp_lib_not_fn538#    error "__cpp_lib_not_fn should be defined in c++26"539#  endif540#  if __cpp_lib_not_fn != 202306L541#    error "__cpp_lib_not_fn should have the value 202306L in c++26"542#  endif543 544#  ifndef __cpp_lib_ranges545#    error "__cpp_lib_ranges should be defined in c++26"546#  endif547#  if __cpp_lib_ranges != 202406L548#    error "__cpp_lib_ranges should have the value 202406L in c++26"549#  endif550 551#  ifndef __cpp_lib_reference_wrapper552#    error "__cpp_lib_reference_wrapper should be defined in c++26"553#  endif554#  if __cpp_lib_reference_wrapper != 202403L555#    error "__cpp_lib_reference_wrapper should have the value 202403L in c++26"556#  endif557 558#  ifndef __cpp_lib_result_of_sfinae559#    error "__cpp_lib_result_of_sfinae should be defined in c++26"560#  endif561#  if __cpp_lib_result_of_sfinae != 201210L562#    error "__cpp_lib_result_of_sfinae should have the value 201210L in c++26"563#  endif564 565#  ifndef __cpp_lib_transparent_operators566#    error "__cpp_lib_transparent_operators should be defined in c++26"567#  endif568#  if __cpp_lib_transparent_operators != 201510L569#    error "__cpp_lib_transparent_operators should have the value 201510L in c++26"570#  endif571 572#  ifndef __cpp_lib_unwrap_ref573#    error "__cpp_lib_unwrap_ref should be defined in c++26"574#  endif575#  if __cpp_lib_unwrap_ref != 201811L576#    error "__cpp_lib_unwrap_ref should have the value 201811L in c++26"577#  endif578 579#endif // TEST_STD_VER > 23580 581// clang-format on582