123 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// <span>13 14// Test the feature test macros defined by <span>15 16// clang-format off17 18#include <span>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23# ifdef __cpp_lib_span24# error "__cpp_lib_span should not be defined before c++20"25# endif26 27# ifdef __cpp_lib_span_at28# error "__cpp_lib_span_at should not be defined before c++26"29# endif30 31# ifdef __cpp_lib_span_initializer_list32# error "__cpp_lib_span_initializer_list should not be defined before c++26"33# endif34 35#elif TEST_STD_VER == 1436 37# ifdef __cpp_lib_span38# error "__cpp_lib_span should not be defined before c++20"39# endif40 41# ifdef __cpp_lib_span_at42# error "__cpp_lib_span_at should not be defined before c++26"43# endif44 45# ifdef __cpp_lib_span_initializer_list46# error "__cpp_lib_span_initializer_list should not be defined before c++26"47# endif48 49#elif TEST_STD_VER == 1750 51# ifdef __cpp_lib_span52# error "__cpp_lib_span should not be defined before c++20"53# endif54 55# ifdef __cpp_lib_span_at56# error "__cpp_lib_span_at should not be defined before c++26"57# endif58 59# ifdef __cpp_lib_span_initializer_list60# error "__cpp_lib_span_initializer_list should not be defined before c++26"61# endif62 63#elif TEST_STD_VER == 2064 65# ifndef __cpp_lib_span66# error "__cpp_lib_span should be defined in c++20"67# endif68# if __cpp_lib_span != 202002L69# error "__cpp_lib_span should have the value 202002L in c++20"70# endif71 72# ifdef __cpp_lib_span_at73# error "__cpp_lib_span_at should not be defined before c++26"74# endif75 76# ifdef __cpp_lib_span_initializer_list77# error "__cpp_lib_span_initializer_list should not be defined before c++26"78# endif79 80#elif TEST_STD_VER == 2381 82# ifndef __cpp_lib_span83# error "__cpp_lib_span should be defined in c++23"84# endif85# if __cpp_lib_span != 202002L86# error "__cpp_lib_span should have the value 202002L in c++23"87# endif88 89# ifdef __cpp_lib_span_at90# error "__cpp_lib_span_at should not be defined before c++26"91# endif92 93# ifdef __cpp_lib_span_initializer_list94# error "__cpp_lib_span_initializer_list should not be defined before c++26"95# endif96 97#elif TEST_STD_VER > 2398 99# ifndef __cpp_lib_span100# error "__cpp_lib_span should be defined in c++26"101# endif102# if __cpp_lib_span != 202002L103# error "__cpp_lib_span should have the value 202002L in c++26"104# endif105 106# ifndef __cpp_lib_span_at107# error "__cpp_lib_span_at should be defined in c++26"108# endif109# if __cpp_lib_span_at != 202311L110# error "__cpp_lib_span_at should have the value 202311L in c++26"111# endif112 113# ifndef __cpp_lib_span_initializer_list114# error "__cpp_lib_span_initializer_list should be defined in c++26"115# endif116# if __cpp_lib_span_initializer_list != 202311L117# error "__cpp_lib_span_initializer_list should have the value 202311L in c++26"118# endif119 120#endif // TEST_STD_VER > 23121 122// clang-format on123