brintos

brintos / llvm-project-archived public Read only

0
0
Text · 4.4 KiB · fad0e5b Raw
159 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// <mdspan>13 14// Test the feature test macros defined by <mdspan>15 16// clang-format off17 18#include <mdspan>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23#  ifdef __cpp_lib_aligned_accessor24#    error "__cpp_lib_aligned_accessor should not be defined before c++26"25#  endif26 27#  ifdef __cpp_lib_freestanding_mdspan28#    error "__cpp_lib_freestanding_mdspan should not be defined before c++26"29#  endif30 31#  ifdef __cpp_lib_mdspan32#    error "__cpp_lib_mdspan should not be defined before c++23"33#  endif34 35#  ifdef __cpp_lib_submdspan36#    error "__cpp_lib_submdspan should not be defined before c++26"37#  endif38 39#elif TEST_STD_VER == 1440 41#  ifdef __cpp_lib_aligned_accessor42#    error "__cpp_lib_aligned_accessor should not be defined before c++26"43#  endif44 45#  ifdef __cpp_lib_freestanding_mdspan46#    error "__cpp_lib_freestanding_mdspan should not be defined before c++26"47#  endif48 49#  ifdef __cpp_lib_mdspan50#    error "__cpp_lib_mdspan should not be defined before c++23"51#  endif52 53#  ifdef __cpp_lib_submdspan54#    error "__cpp_lib_submdspan should not be defined before c++26"55#  endif56 57#elif TEST_STD_VER == 1758 59#  ifdef __cpp_lib_aligned_accessor60#    error "__cpp_lib_aligned_accessor should not be defined before c++26"61#  endif62 63#  ifdef __cpp_lib_freestanding_mdspan64#    error "__cpp_lib_freestanding_mdspan should not be defined before c++26"65#  endif66 67#  ifdef __cpp_lib_mdspan68#    error "__cpp_lib_mdspan should not be defined before c++23"69#  endif70 71#  ifdef __cpp_lib_submdspan72#    error "__cpp_lib_submdspan should not be defined before c++26"73#  endif74 75#elif TEST_STD_VER == 2076 77#  ifdef __cpp_lib_aligned_accessor78#    error "__cpp_lib_aligned_accessor should not be defined before c++26"79#  endif80 81#  ifdef __cpp_lib_freestanding_mdspan82#    error "__cpp_lib_freestanding_mdspan should not be defined before c++26"83#  endif84 85#  ifdef __cpp_lib_mdspan86#    error "__cpp_lib_mdspan should not be defined before c++23"87#  endif88 89#  ifdef __cpp_lib_submdspan90#    error "__cpp_lib_submdspan should not be defined before c++26"91#  endif92 93#elif TEST_STD_VER == 2394 95#  ifdef __cpp_lib_aligned_accessor96#    error "__cpp_lib_aligned_accessor should not be defined before c++26"97#  endif98 99#  ifdef __cpp_lib_freestanding_mdspan100#    error "__cpp_lib_freestanding_mdspan should not be defined before c++26"101#  endif102 103#  ifndef __cpp_lib_mdspan104#    error "__cpp_lib_mdspan should be defined in c++23"105#  endif106#  if __cpp_lib_mdspan != 202207L107#    error "__cpp_lib_mdspan should have the value 202207L in c++23"108#  endif109 110#  ifdef __cpp_lib_submdspan111#    error "__cpp_lib_submdspan should not be defined before c++26"112#  endif113 114#elif TEST_STD_VER > 23115 116#  ifndef __cpp_lib_aligned_accessor117#    error "__cpp_lib_aligned_accessor should be defined in c++26"118#  endif119#  if __cpp_lib_aligned_accessor != 202411L120#    error "__cpp_lib_aligned_accessor should have the value 202411L in c++26"121#  endif122 123#  if !defined(_LIBCPP_VERSION)124#    ifndef __cpp_lib_freestanding_mdspan125#      error "__cpp_lib_freestanding_mdspan should be defined in c++26"126#    endif127#    if __cpp_lib_freestanding_mdspan != 202311L128#      error "__cpp_lib_freestanding_mdspan should have the value 202311L in c++26"129#    endif130#  else131#    ifdef __cpp_lib_freestanding_mdspan132#      error "__cpp_lib_freestanding_mdspan should not be defined because it is unimplemented in libc++!"133#    endif134#  endif135 136#  ifndef __cpp_lib_mdspan137#    error "__cpp_lib_mdspan should be defined in c++26"138#  endif139#  if __cpp_lib_mdspan != 202406L140#    error "__cpp_lib_mdspan should have the value 202406L in c++26"141#  endif142 143#  if !defined(_LIBCPP_VERSION)144#    ifndef __cpp_lib_submdspan145#      error "__cpp_lib_submdspan should be defined in c++26"146#    endif147#    if __cpp_lib_submdspan != 202306L148#      error "__cpp_lib_submdspan should have the value 202306L in c++26"149#    endif150#  else151#    ifdef __cpp_lib_submdspan152#      error "__cpp_lib_submdspan should not be defined because it is unimplemented in libc++!"153#    endif154#  endif155 156#endif // TEST_STD_VER > 23157 158// clang-format on159