brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.4 KiB · 30efb61 Raw
174 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// <array>13 14// Test the feature test macros defined by <array>15 16// clang-format off17 18#include <array>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23#  ifdef __cpp_lib_array_constexpr24#    error "__cpp_lib_array_constexpr should not be defined before c++17"25#  endif26 27#  ifdef __cpp_lib_freestanding_array28#    error "__cpp_lib_freestanding_array should not be defined before c++26"29#  endif30 31#  ifdef __cpp_lib_nonmember_container_access32#    error "__cpp_lib_nonmember_container_access should not be defined before c++17"33#  endif34 35#  ifdef __cpp_lib_to_array36#    error "__cpp_lib_to_array should not be defined before c++20"37#  endif38 39#elif TEST_STD_VER == 1440 41#  ifdef __cpp_lib_array_constexpr42#    error "__cpp_lib_array_constexpr should not be defined before c++17"43#  endif44 45#  ifdef __cpp_lib_freestanding_array46#    error "__cpp_lib_freestanding_array should not be defined before c++26"47#  endif48 49#  ifdef __cpp_lib_nonmember_container_access50#    error "__cpp_lib_nonmember_container_access should not be defined before c++17"51#  endif52 53#  ifdef __cpp_lib_to_array54#    error "__cpp_lib_to_array should not be defined before c++20"55#  endif56 57#elif TEST_STD_VER == 1758 59#  ifndef __cpp_lib_array_constexpr60#    error "__cpp_lib_array_constexpr should be defined in c++17"61#  endif62#  if __cpp_lib_array_constexpr != 201603L63#    error "__cpp_lib_array_constexpr should have the value 201603L in c++17"64#  endif65 66#  ifdef __cpp_lib_freestanding_array67#    error "__cpp_lib_freestanding_array should not be defined before c++26"68#  endif69 70#  ifndef __cpp_lib_nonmember_container_access71#    error "__cpp_lib_nonmember_container_access should be defined in c++17"72#  endif73#  if __cpp_lib_nonmember_container_access != 201411L74#    error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"75#  endif76 77#  ifdef __cpp_lib_to_array78#    error "__cpp_lib_to_array should not be defined before c++20"79#  endif80 81#elif TEST_STD_VER == 2082 83#  ifndef __cpp_lib_array_constexpr84#    error "__cpp_lib_array_constexpr should be defined in c++20"85#  endif86#  if __cpp_lib_array_constexpr != 201811L87#    error "__cpp_lib_array_constexpr should have the value 201811L in c++20"88#  endif89 90#  ifdef __cpp_lib_freestanding_array91#    error "__cpp_lib_freestanding_array should not be defined before c++26"92#  endif93 94#  ifndef __cpp_lib_nonmember_container_access95#    error "__cpp_lib_nonmember_container_access should be defined in c++20"96#  endif97#  if __cpp_lib_nonmember_container_access != 201411L98#    error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"99#  endif100 101#  ifndef __cpp_lib_to_array102#    error "__cpp_lib_to_array should be defined in c++20"103#  endif104#  if __cpp_lib_to_array != 201907L105#    error "__cpp_lib_to_array should have the value 201907L in c++20"106#  endif107 108#elif TEST_STD_VER == 23109 110#  ifndef __cpp_lib_array_constexpr111#    error "__cpp_lib_array_constexpr should be defined in c++23"112#  endif113#  if __cpp_lib_array_constexpr != 201811L114#    error "__cpp_lib_array_constexpr should have the value 201811L in c++23"115#  endif116 117#  ifdef __cpp_lib_freestanding_array118#    error "__cpp_lib_freestanding_array should not be defined before c++26"119#  endif120 121#  ifndef __cpp_lib_nonmember_container_access122#    error "__cpp_lib_nonmember_container_access should be defined in c++23"123#  endif124#  if __cpp_lib_nonmember_container_access != 201411L125#    error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"126#  endif127 128#  ifndef __cpp_lib_to_array129#    error "__cpp_lib_to_array should be defined in c++23"130#  endif131#  if __cpp_lib_to_array != 201907L132#    error "__cpp_lib_to_array should have the value 201907L in c++23"133#  endif134 135#elif TEST_STD_VER > 23136 137#  ifndef __cpp_lib_array_constexpr138#    error "__cpp_lib_array_constexpr should be defined in c++26"139#  endif140#  if __cpp_lib_array_constexpr != 201811L141#    error "__cpp_lib_array_constexpr should have the value 201811L in c++26"142#  endif143 144#  if !defined(_LIBCPP_VERSION)145#    ifndef __cpp_lib_freestanding_array146#      error "__cpp_lib_freestanding_array should be defined in c++26"147#    endif148#    if __cpp_lib_freestanding_array != 202311L149#      error "__cpp_lib_freestanding_array should have the value 202311L in c++26"150#    endif151#  else152#    ifdef __cpp_lib_freestanding_array153#      error "__cpp_lib_freestanding_array should not be defined because it is unimplemented in libc++!"154#    endif155#  endif156 157#  ifndef __cpp_lib_nonmember_container_access158#    error "__cpp_lib_nonmember_container_access should be defined in c++26"159#  endif160#  if __cpp_lib_nonmember_container_access != 201411L161#    error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"162#  endif163 164#  ifndef __cpp_lib_to_array165#    error "__cpp_lib_to_array should be defined in c++26"166#  endif167#  if __cpp_lib_to_array != 201907L168#    error "__cpp_lib_to_array should have the value 201907L in c++26"169#  endif170 171#endif // TEST_STD_VER > 23172 173// clang-format on174