brintos

brintos / llvm-project-archived public Read only

0
0
Text · 14.9 KiB · 5116864 Raw
480 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// <ranges>13 14// Test the feature test macros defined by <ranges>15 16// clang-format off17 18#include <ranges>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23#  ifdef __cpp_lib_default_template_type_for_algorithm_values24#    error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"25#  endif26 27#  ifdef __cpp_lib_ranges28#    error "__cpp_lib_ranges should not be defined before c++20"29#  endif30 31#  ifdef __cpp_lib_ranges_as_const32#    error "__cpp_lib_ranges_as_const should not be defined before c++23"33#  endif34 35#  ifdef __cpp_lib_ranges_as_rvalue36#    error "__cpp_lib_ranges_as_rvalue should not be defined before c++23"37#  endif38 39#  ifdef __cpp_lib_ranges_chunk40#    error "__cpp_lib_ranges_chunk should not be defined before c++23"41#  endif42 43#  ifdef __cpp_lib_ranges_chunk_by44#    error "__cpp_lib_ranges_chunk_by should not be defined before c++23"45#  endif46 47#  ifdef __cpp_lib_ranges_concat48#    error "__cpp_lib_ranges_concat should not be defined before c++26"49#  endif50 51#  ifdef __cpp_lib_ranges_indices52#    error "__cpp_lib_ranges_indices should not be defined before c++26"53#  endif54 55#  ifdef __cpp_lib_ranges_join_with56#    error "__cpp_lib_ranges_join_with should not be defined before c++23"57#  endif58 59#  ifdef __cpp_lib_ranges_repeat60#    error "__cpp_lib_ranges_repeat should not be defined before c++23"61#  endif62 63#  ifdef __cpp_lib_ranges_slide64#    error "__cpp_lib_ranges_slide should not be defined before c++23"65#  endif66 67#  ifdef __cpp_lib_ranges_to_container68#    error "__cpp_lib_ranges_to_container should not be defined before c++23"69#  endif70 71#  ifdef __cpp_lib_ranges_zip72#    error "__cpp_lib_ranges_zip should not be defined before c++23"73#  endif74 75#elif TEST_STD_VER == 1476 77#  ifdef __cpp_lib_default_template_type_for_algorithm_values78#    error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"79#  endif80 81#  ifdef __cpp_lib_ranges82#    error "__cpp_lib_ranges should not be defined before c++20"83#  endif84 85#  ifdef __cpp_lib_ranges_as_const86#    error "__cpp_lib_ranges_as_const should not be defined before c++23"87#  endif88 89#  ifdef __cpp_lib_ranges_as_rvalue90#    error "__cpp_lib_ranges_as_rvalue should not be defined before c++23"91#  endif92 93#  ifdef __cpp_lib_ranges_chunk94#    error "__cpp_lib_ranges_chunk should not be defined before c++23"95#  endif96 97#  ifdef __cpp_lib_ranges_chunk_by98#    error "__cpp_lib_ranges_chunk_by should not be defined before c++23"99#  endif100 101#  ifdef __cpp_lib_ranges_concat102#    error "__cpp_lib_ranges_concat should not be defined before c++26"103#  endif104 105#  ifdef __cpp_lib_ranges_indices106#    error "__cpp_lib_ranges_indices should not be defined before c++26"107#  endif108 109#  ifdef __cpp_lib_ranges_join_with110#    error "__cpp_lib_ranges_join_with should not be defined before c++23"111#  endif112 113#  ifdef __cpp_lib_ranges_repeat114#    error "__cpp_lib_ranges_repeat should not be defined before c++23"115#  endif116 117#  ifdef __cpp_lib_ranges_slide118#    error "__cpp_lib_ranges_slide should not be defined before c++23"119#  endif120 121#  ifdef __cpp_lib_ranges_to_container122#    error "__cpp_lib_ranges_to_container should not be defined before c++23"123#  endif124 125#  ifdef __cpp_lib_ranges_zip126#    error "__cpp_lib_ranges_zip should not be defined before c++23"127#  endif128 129#elif TEST_STD_VER == 17130 131#  ifdef __cpp_lib_default_template_type_for_algorithm_values132#    error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"133#  endif134 135#  ifdef __cpp_lib_ranges136#    error "__cpp_lib_ranges should not be defined before c++20"137#  endif138 139#  ifdef __cpp_lib_ranges_as_const140#    error "__cpp_lib_ranges_as_const should not be defined before c++23"141#  endif142 143#  ifdef __cpp_lib_ranges_as_rvalue144#    error "__cpp_lib_ranges_as_rvalue should not be defined before c++23"145#  endif146 147#  ifdef __cpp_lib_ranges_chunk148#    error "__cpp_lib_ranges_chunk should not be defined before c++23"149#  endif150 151#  ifdef __cpp_lib_ranges_chunk_by152#    error "__cpp_lib_ranges_chunk_by should not be defined before c++23"153#  endif154 155#  ifdef __cpp_lib_ranges_concat156#    error "__cpp_lib_ranges_concat should not be defined before c++26"157#  endif158 159#  ifdef __cpp_lib_ranges_indices160#    error "__cpp_lib_ranges_indices should not be defined before c++26"161#  endif162 163#  ifdef __cpp_lib_ranges_join_with164#    error "__cpp_lib_ranges_join_with should not be defined before c++23"165#  endif166 167#  ifdef __cpp_lib_ranges_repeat168#    error "__cpp_lib_ranges_repeat should not be defined before c++23"169#  endif170 171#  ifdef __cpp_lib_ranges_slide172#    error "__cpp_lib_ranges_slide should not be defined before c++23"173#  endif174 175#  ifdef __cpp_lib_ranges_to_container176#    error "__cpp_lib_ranges_to_container should not be defined before c++23"177#  endif178 179#  ifdef __cpp_lib_ranges_zip180#    error "__cpp_lib_ranges_zip should not be defined before c++23"181#  endif182 183#elif TEST_STD_VER == 20184 185#  ifdef __cpp_lib_default_template_type_for_algorithm_values186#    error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"187#  endif188 189#  ifndef __cpp_lib_ranges190#    error "__cpp_lib_ranges should be defined in c++20"191#  endif192#  if __cpp_lib_ranges != 202110L193#    error "__cpp_lib_ranges should have the value 202110L in c++20"194#  endif195 196#  ifdef __cpp_lib_ranges_as_const197#    error "__cpp_lib_ranges_as_const should not be defined before c++23"198#  endif199 200#  ifdef __cpp_lib_ranges_as_rvalue201#    error "__cpp_lib_ranges_as_rvalue should not be defined before c++23"202#  endif203 204#  ifdef __cpp_lib_ranges_chunk205#    error "__cpp_lib_ranges_chunk should not be defined before c++23"206#  endif207 208#  ifdef __cpp_lib_ranges_chunk_by209#    error "__cpp_lib_ranges_chunk_by should not be defined before c++23"210#  endif211 212#  ifdef __cpp_lib_ranges_concat213#    error "__cpp_lib_ranges_concat should not be defined before c++26"214#  endif215 216#  ifdef __cpp_lib_ranges_indices217#    error "__cpp_lib_ranges_indices should not be defined before c++26"218#  endif219 220#  ifdef __cpp_lib_ranges_join_with221#    error "__cpp_lib_ranges_join_with should not be defined before c++23"222#  endif223 224#  ifdef __cpp_lib_ranges_repeat225#    error "__cpp_lib_ranges_repeat should not be defined before c++23"226#  endif227 228#  ifdef __cpp_lib_ranges_slide229#    error "__cpp_lib_ranges_slide should not be defined before c++23"230#  endif231 232#  ifdef __cpp_lib_ranges_to_container233#    error "__cpp_lib_ranges_to_container should not be defined before c++23"234#  endif235 236#  ifdef __cpp_lib_ranges_zip237#    error "__cpp_lib_ranges_zip should not be defined before c++23"238#  endif239 240#elif TEST_STD_VER == 23241 242#  ifdef __cpp_lib_default_template_type_for_algorithm_values243#    error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"244#  endif245 246#  ifndef __cpp_lib_ranges247#    error "__cpp_lib_ranges should be defined in c++23"248#  endif249#  if __cpp_lib_ranges != 202406L250#    error "__cpp_lib_ranges should have the value 202406L in c++23"251#  endif252 253#  if !defined(_LIBCPP_VERSION)254#    ifndef __cpp_lib_ranges_as_const255#      error "__cpp_lib_ranges_as_const should be defined in c++23"256#    endif257#    if __cpp_lib_ranges_as_const != 202207L258#      error "__cpp_lib_ranges_as_const should have the value 202207L in c++23"259#    endif260#  else261#    ifdef __cpp_lib_ranges_as_const262#      error "__cpp_lib_ranges_as_const should not be defined because it is unimplemented in libc++!"263#    endif264#  endif265 266#  ifndef __cpp_lib_ranges_as_rvalue267#    error "__cpp_lib_ranges_as_rvalue should be defined in c++23"268#  endif269#  if __cpp_lib_ranges_as_rvalue != 202207L270#    error "__cpp_lib_ranges_as_rvalue should have the value 202207L in c++23"271#  endif272 273#  if !defined(_LIBCPP_VERSION)274#    ifndef __cpp_lib_ranges_chunk275#      error "__cpp_lib_ranges_chunk should be defined in c++23"276#    endif277#    if __cpp_lib_ranges_chunk != 202202L278#      error "__cpp_lib_ranges_chunk should have the value 202202L in c++23"279#    endif280#  else281#    ifdef __cpp_lib_ranges_chunk282#      error "__cpp_lib_ranges_chunk should not be defined because it is unimplemented in libc++!"283#    endif284#  endif285 286#  ifndef __cpp_lib_ranges_chunk_by287#    error "__cpp_lib_ranges_chunk_by should be defined in c++23"288#  endif289#  if __cpp_lib_ranges_chunk_by != 202202L290#    error "__cpp_lib_ranges_chunk_by should have the value 202202L in c++23"291#  endif292 293#  ifdef __cpp_lib_ranges_concat294#    error "__cpp_lib_ranges_concat should not be defined before c++26"295#  endif296 297#  ifdef __cpp_lib_ranges_indices298#    error "__cpp_lib_ranges_indices should not be defined before c++26"299#  endif300 301#  ifndef __cpp_lib_ranges_join_with302#    error "__cpp_lib_ranges_join_with should be defined in c++23"303#  endif304#  if __cpp_lib_ranges_join_with != 202202L305#    error "__cpp_lib_ranges_join_with should have the value 202202L in c++23"306#  endif307 308#  ifndef __cpp_lib_ranges_repeat309#    error "__cpp_lib_ranges_repeat should be defined in c++23"310#  endif311#  if __cpp_lib_ranges_repeat != 202207L312#    error "__cpp_lib_ranges_repeat should have the value 202207L in c++23"313#  endif314 315#  if !defined(_LIBCPP_VERSION)316#    ifndef __cpp_lib_ranges_slide317#      error "__cpp_lib_ranges_slide should be defined in c++23"318#    endif319#    if __cpp_lib_ranges_slide != 202202L320#      error "__cpp_lib_ranges_slide should have the value 202202L in c++23"321#    endif322#  else323#    ifdef __cpp_lib_ranges_slide324#      error "__cpp_lib_ranges_slide should not be defined because it is unimplemented in libc++!"325#    endif326#  endif327 328#  ifndef __cpp_lib_ranges_to_container329#    error "__cpp_lib_ranges_to_container should be defined in c++23"330#  endif331#  if __cpp_lib_ranges_to_container != 202202L332#    error "__cpp_lib_ranges_to_container should have the value 202202L in c++23"333#  endif334 335#  if !defined(_LIBCPP_VERSION)336#    ifndef __cpp_lib_ranges_zip337#      error "__cpp_lib_ranges_zip should be defined in c++23"338#    endif339#    if __cpp_lib_ranges_zip != 202110L340#      error "__cpp_lib_ranges_zip should have the value 202110L in c++23"341#    endif342#  else343#    ifdef __cpp_lib_ranges_zip344#      error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!"345#    endif346#  endif347 348#elif TEST_STD_VER > 23349 350#  if !defined(_LIBCPP_VERSION)351#    ifndef __cpp_lib_default_template_type_for_algorithm_values352#      error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26"353#    endif354#    if __cpp_lib_default_template_type_for_algorithm_values != 202403L355#      error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26"356#    endif357#  else358#    ifdef __cpp_lib_default_template_type_for_algorithm_values359#      error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!"360#    endif361#  endif362 363#  ifndef __cpp_lib_ranges364#    error "__cpp_lib_ranges should be defined in c++26"365#  endif366#  if __cpp_lib_ranges != 202406L367#    error "__cpp_lib_ranges should have the value 202406L in c++26"368#  endif369 370#  if !defined(_LIBCPP_VERSION)371#    ifndef __cpp_lib_ranges_as_const372#      error "__cpp_lib_ranges_as_const should be defined in c++26"373#    endif374#    if __cpp_lib_ranges_as_const != 202207L375#      error "__cpp_lib_ranges_as_const should have the value 202207L in c++26"376#    endif377#  else378#    ifdef __cpp_lib_ranges_as_const379#      error "__cpp_lib_ranges_as_const should not be defined because it is unimplemented in libc++!"380#    endif381#  endif382 383#  ifndef __cpp_lib_ranges_as_rvalue384#    error "__cpp_lib_ranges_as_rvalue should be defined in c++26"385#  endif386#  if __cpp_lib_ranges_as_rvalue != 202207L387#    error "__cpp_lib_ranges_as_rvalue should have the value 202207L in c++26"388#  endif389 390#  if !defined(_LIBCPP_VERSION)391#    ifndef __cpp_lib_ranges_chunk392#      error "__cpp_lib_ranges_chunk should be defined in c++26"393#    endif394#    if __cpp_lib_ranges_chunk != 202202L395#      error "__cpp_lib_ranges_chunk should have the value 202202L in c++26"396#    endif397#  else398#    ifdef __cpp_lib_ranges_chunk399#      error "__cpp_lib_ranges_chunk should not be defined because it is unimplemented in libc++!"400#    endif401#  endif402 403#  ifndef __cpp_lib_ranges_chunk_by404#    error "__cpp_lib_ranges_chunk_by should be defined in c++26"405#  endif406#  if __cpp_lib_ranges_chunk_by != 202202L407#    error "__cpp_lib_ranges_chunk_by should have the value 202202L in c++26"408#  endif409 410#  if !defined(_LIBCPP_VERSION)411#    ifndef __cpp_lib_ranges_concat412#      error "__cpp_lib_ranges_concat should be defined in c++26"413#    endif414#    if __cpp_lib_ranges_concat != 202403L415#      error "__cpp_lib_ranges_concat should have the value 202403L in c++26"416#    endif417#  else418#    ifdef __cpp_lib_ranges_concat419#      error "__cpp_lib_ranges_concat should not be defined because it is unimplemented in libc++!"420#    endif421#  endif422 423#  ifndef __cpp_lib_ranges_indices424#    error "__cpp_lib_ranges_indices should be defined in c++26"425#  endif426#  if __cpp_lib_ranges_indices != 202506L427#    error "__cpp_lib_ranges_indices should have the value 202506L in c++26"428#  endif429 430#  ifndef __cpp_lib_ranges_join_with431#    error "__cpp_lib_ranges_join_with should be defined in c++26"432#  endif433#  if __cpp_lib_ranges_join_with != 202202L434#    error "__cpp_lib_ranges_join_with should have the value 202202L in c++26"435#  endif436 437#  ifndef __cpp_lib_ranges_repeat438#    error "__cpp_lib_ranges_repeat should be defined in c++26"439#  endif440#  if __cpp_lib_ranges_repeat != 202207L441#    error "__cpp_lib_ranges_repeat should have the value 202207L in c++26"442#  endif443 444#  if !defined(_LIBCPP_VERSION)445#    ifndef __cpp_lib_ranges_slide446#      error "__cpp_lib_ranges_slide should be defined in c++26"447#    endif448#    if __cpp_lib_ranges_slide != 202202L449#      error "__cpp_lib_ranges_slide should have the value 202202L in c++26"450#    endif451#  else452#    ifdef __cpp_lib_ranges_slide453#      error "__cpp_lib_ranges_slide should not be defined because it is unimplemented in libc++!"454#    endif455#  endif456 457#  ifndef __cpp_lib_ranges_to_container458#    error "__cpp_lib_ranges_to_container should be defined in c++26"459#  endif460#  if __cpp_lib_ranges_to_container != 202202L461#    error "__cpp_lib_ranges_to_container should have the value 202202L in c++26"462#  endif463 464#  if !defined(_LIBCPP_VERSION)465#    ifndef __cpp_lib_ranges_zip466#      error "__cpp_lib_ranges_zip should be defined in c++26"467#    endif468#    if __cpp_lib_ranges_zip != 202110L469#      error "__cpp_lib_ranges_zip should have the value 202110L in c++26"470#    endif471#  else472#    ifdef __cpp_lib_ranges_zip473#      error "__cpp_lib_ranges_zip should not be defined because it is unimplemented in libc++!"474#    endif475#  endif476 477#endif // TEST_STD_VER > 23478 479// clang-format on480