brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.0 KiB · 3797e09 Raw
216 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// <new>13 14// Test the feature test macros defined by <new>15 16// clang-format off17 18#include <new>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23#  ifdef __cpp_lib_constexpr_new24#    error "__cpp_lib_constexpr_new should not be defined before c++26"25#  endif26 27#  ifdef __cpp_lib_destroying_delete28#    error "__cpp_lib_destroying_delete should not be defined before c++20"29#  endif30 31#  ifdef __cpp_lib_hardware_interference_size32#    error "__cpp_lib_hardware_interference_size should not be defined before c++17"33#  endif34 35#  ifdef __cpp_lib_launder36#    error "__cpp_lib_launder should not be defined before c++17"37#  endif38 39#elif TEST_STD_VER == 1440 41#  ifdef __cpp_lib_constexpr_new42#    error "__cpp_lib_constexpr_new should not be defined before c++26"43#  endif44 45#  ifdef __cpp_lib_destroying_delete46#    error "__cpp_lib_destroying_delete should not be defined before c++20"47#  endif48 49#  ifdef __cpp_lib_hardware_interference_size50#    error "__cpp_lib_hardware_interference_size should not be defined before c++17"51#  endif52 53#  ifdef __cpp_lib_launder54#    error "__cpp_lib_launder should not be defined before c++17"55#  endif56 57#elif TEST_STD_VER == 1758 59#  ifdef __cpp_lib_constexpr_new60#    error "__cpp_lib_constexpr_new should not be defined before c++26"61#  endif62 63#  ifdef __cpp_lib_destroying_delete64#    error "__cpp_lib_destroying_delete should not be defined before c++20"65#  endif66 67#  if !defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))68#    ifndef __cpp_lib_hardware_interference_size69#      error "__cpp_lib_hardware_interference_size should be defined in c++17"70#    endif71#    if __cpp_lib_hardware_interference_size != 201703L72#      error "__cpp_lib_hardware_interference_size should have the value 201703L in c++17"73#    endif74#  else75#    ifdef __cpp_lib_hardware_interference_size76#      error "__cpp_lib_hardware_interference_size should not be defined when the requirement '!defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))' is not met!"77#    endif78#  endif79 80#  ifndef __cpp_lib_launder81#    error "__cpp_lib_launder should be defined in c++17"82#  endif83#  if __cpp_lib_launder != 201606L84#    error "__cpp_lib_launder should have the value 201606L in c++17"85#  endif86 87#elif TEST_STD_VER == 2088 89#  ifdef __cpp_lib_constexpr_new90#    error "__cpp_lib_constexpr_new should not be defined before c++26"91#  endif92 93#  if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L94#    ifndef __cpp_lib_destroying_delete95#      error "__cpp_lib_destroying_delete should be defined in c++20"96#    endif97#    if __cpp_lib_destroying_delete != 201806L98#      error "__cpp_lib_destroying_delete should have the value 201806L in c++20"99#    endif100#  else101#    ifdef __cpp_lib_destroying_delete102#      error "__cpp_lib_destroying_delete should not be defined when the requirement 'TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L' is not met!"103#    endif104#  endif105 106#  if !defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))107#    ifndef __cpp_lib_hardware_interference_size108#      error "__cpp_lib_hardware_interference_size should be defined in c++20"109#    endif110#    if __cpp_lib_hardware_interference_size != 201703L111#      error "__cpp_lib_hardware_interference_size should have the value 201703L in c++20"112#    endif113#  else114#    ifdef __cpp_lib_hardware_interference_size115#      error "__cpp_lib_hardware_interference_size should not be defined when the requirement '!defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))' is not met!"116#    endif117#  endif118 119#  ifndef __cpp_lib_launder120#    error "__cpp_lib_launder should be defined in c++20"121#  endif122#  if __cpp_lib_launder != 201606L123#    error "__cpp_lib_launder should have the value 201606L in c++20"124#  endif125 126#elif TEST_STD_VER == 23127 128#  ifdef __cpp_lib_constexpr_new129#    error "__cpp_lib_constexpr_new should not be defined before c++26"130#  endif131 132#  if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L133#    ifndef __cpp_lib_destroying_delete134#      error "__cpp_lib_destroying_delete should be defined in c++23"135#    endif136#    if __cpp_lib_destroying_delete != 201806L137#      error "__cpp_lib_destroying_delete should have the value 201806L in c++23"138#    endif139#  else140#    ifdef __cpp_lib_destroying_delete141#      error "__cpp_lib_destroying_delete should not be defined when the requirement 'TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L' is not met!"142#    endif143#  endif144 145#  if !defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))146#    ifndef __cpp_lib_hardware_interference_size147#      error "__cpp_lib_hardware_interference_size should be defined in c++23"148#    endif149#    if __cpp_lib_hardware_interference_size != 201703L150#      error "__cpp_lib_hardware_interference_size should have the value 201703L in c++23"151#    endif152#  else153#    ifdef __cpp_lib_hardware_interference_size154#      error "__cpp_lib_hardware_interference_size should not be defined when the requirement '!defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))' is not met!"155#    endif156#  endif157 158#  ifndef __cpp_lib_launder159#    error "__cpp_lib_launder should be defined in c++23"160#  endif161#  if __cpp_lib_launder != 201606L162#    error "__cpp_lib_launder should have the value 201606L in c++23"163#  endif164 165#elif TEST_STD_VER > 23166 167#  if !defined(_LIBCPP_ABI_VCRUNTIME)168#    ifndef __cpp_lib_constexpr_new169#      error "__cpp_lib_constexpr_new should be defined in c++26"170#    endif171#    if __cpp_lib_constexpr_new != 202406L172#      error "__cpp_lib_constexpr_new should have the value 202406L in c++26"173#    endif174#  else175#    ifdef __cpp_lib_constexpr_new176#      error "__cpp_lib_constexpr_new should not be defined when the requirement '!defined(_LIBCPP_ABI_VCRUNTIME)' is not met!"177#    endif178#  endif179 180#  if TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L181#    ifndef __cpp_lib_destroying_delete182#      error "__cpp_lib_destroying_delete should be defined in c++26"183#    endif184#    if __cpp_lib_destroying_delete != 201806L185#      error "__cpp_lib_destroying_delete should have the value 201806L in c++26"186#    endif187#  else188#    ifdef __cpp_lib_destroying_delete189#      error "__cpp_lib_destroying_delete should not be defined when the requirement 'TEST_STD_VER > 17 && defined(__cpp_impl_destroying_delete) && __cpp_impl_destroying_delete >= 201806L' is not met!"190#    endif191#  endif192 193#  if !defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))194#    ifndef __cpp_lib_hardware_interference_size195#      error "__cpp_lib_hardware_interference_size should be defined in c++26"196#    endif197#    if __cpp_lib_hardware_interference_size != 201703L198#      error "__cpp_lib_hardware_interference_size should have the value 201703L in c++26"199#    endif200#  else201#    ifdef __cpp_lib_hardware_interference_size202#      error "__cpp_lib_hardware_interference_size should not be defined when the requirement '!defined(_LIBCPP_VERSION) || (defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE))' is not met!"203#    endif204#  endif205 206#  ifndef __cpp_lib_launder207#    error "__cpp_lib_launder should be defined in c++26"208#  endif209#  if __cpp_lib_launder != 201606L210#    error "__cpp_lib_launder should have the value 201606L in c++26"211#  endif212 213#endif // TEST_STD_VER > 23214 215// clang-format on216