321 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// <set>13 14// Test the feature test macros defined by <set>15 16// clang-format off17 18#include <set>19#include "test_macros.h"20 21#if TEST_STD_VER < 1422 23# ifdef __cpp_lib_allocator_traits_is_always_equal24# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"25# endif26 27# ifdef __cpp_lib_associative_heterogeneous_erasure28# error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23"29# endif30 31# ifdef __cpp_lib_associative_heterogeneous_insertion32# error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26"33# endif34 35# ifdef __cpp_lib_containers_ranges36# error "__cpp_lib_containers_ranges should not be defined before c++23"37# endif38 39# ifdef __cpp_lib_erase_if40# error "__cpp_lib_erase_if should not be defined before c++20"41# endif42 43# ifdef __cpp_lib_generic_associative_lookup44# error "__cpp_lib_generic_associative_lookup should not be defined before c++14"45# endif46 47# ifdef __cpp_lib_node_extract48# error "__cpp_lib_node_extract should not be defined before c++17"49# endif50 51# ifdef __cpp_lib_nonmember_container_access52# error "__cpp_lib_nonmember_container_access should not be defined before c++17"53# endif54 55#elif TEST_STD_VER == 1456 57# ifdef __cpp_lib_allocator_traits_is_always_equal58# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"59# endif60 61# ifdef __cpp_lib_associative_heterogeneous_erasure62# error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23"63# endif64 65# ifdef __cpp_lib_associative_heterogeneous_insertion66# error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26"67# endif68 69# ifdef __cpp_lib_containers_ranges70# error "__cpp_lib_containers_ranges should not be defined before c++23"71# endif72 73# ifdef __cpp_lib_erase_if74# error "__cpp_lib_erase_if should not be defined before c++20"75# endif76 77# ifndef __cpp_lib_generic_associative_lookup78# error "__cpp_lib_generic_associative_lookup should be defined in c++14"79# endif80# if __cpp_lib_generic_associative_lookup != 201304L81# error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++14"82# endif83 84# ifdef __cpp_lib_node_extract85# error "__cpp_lib_node_extract should not be defined before c++17"86# endif87 88# ifdef __cpp_lib_nonmember_container_access89# error "__cpp_lib_nonmember_container_access should not be defined before c++17"90# endif91 92#elif TEST_STD_VER == 1793 94# ifndef __cpp_lib_allocator_traits_is_always_equal95# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"96# endif97# if __cpp_lib_allocator_traits_is_always_equal != 201411L98# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"99# endif100 101# ifdef __cpp_lib_associative_heterogeneous_erasure102# error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23"103# endif104 105# ifdef __cpp_lib_associative_heterogeneous_insertion106# error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26"107# endif108 109# ifdef __cpp_lib_containers_ranges110# error "__cpp_lib_containers_ranges should not be defined before c++23"111# endif112 113# ifdef __cpp_lib_erase_if114# error "__cpp_lib_erase_if should not be defined before c++20"115# endif116 117# ifndef __cpp_lib_generic_associative_lookup118# error "__cpp_lib_generic_associative_lookup should be defined in c++17"119# endif120# if __cpp_lib_generic_associative_lookup != 201304L121# error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++17"122# endif123 124# ifndef __cpp_lib_node_extract125# error "__cpp_lib_node_extract should be defined in c++17"126# endif127# if __cpp_lib_node_extract != 201606L128# error "__cpp_lib_node_extract should have the value 201606L in c++17"129# endif130 131# ifndef __cpp_lib_nonmember_container_access132# error "__cpp_lib_nonmember_container_access should be defined in c++17"133# endif134# if __cpp_lib_nonmember_container_access != 201411L135# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"136# endif137 138#elif TEST_STD_VER == 20139 140# ifndef __cpp_lib_allocator_traits_is_always_equal141# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"142# endif143# if __cpp_lib_allocator_traits_is_always_equal != 201411L144# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"145# endif146 147# ifdef __cpp_lib_associative_heterogeneous_erasure148# error "__cpp_lib_associative_heterogeneous_erasure should not be defined before c++23"149# endif150 151# ifdef __cpp_lib_associative_heterogeneous_insertion152# error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26"153# endif154 155# ifdef __cpp_lib_containers_ranges156# error "__cpp_lib_containers_ranges should not be defined before c++23"157# endif158 159# ifndef __cpp_lib_erase_if160# error "__cpp_lib_erase_if should be defined in c++20"161# endif162# if __cpp_lib_erase_if != 202002L163# error "__cpp_lib_erase_if should have the value 202002L in c++20"164# endif165 166# ifndef __cpp_lib_generic_associative_lookup167# error "__cpp_lib_generic_associative_lookup should be defined in c++20"168# endif169# if __cpp_lib_generic_associative_lookup != 201304L170# error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++20"171# endif172 173# ifndef __cpp_lib_node_extract174# error "__cpp_lib_node_extract should be defined in c++20"175# endif176# if __cpp_lib_node_extract != 201606L177# error "__cpp_lib_node_extract should have the value 201606L in c++20"178# endif179 180# ifndef __cpp_lib_nonmember_container_access181# error "__cpp_lib_nonmember_container_access should be defined in c++20"182# endif183# if __cpp_lib_nonmember_container_access != 201411L184# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"185# endif186 187#elif TEST_STD_VER == 23188 189# ifndef __cpp_lib_allocator_traits_is_always_equal190# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23"191# endif192# if __cpp_lib_allocator_traits_is_always_equal != 201411L193# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23"194# endif195 196# if !defined(_LIBCPP_VERSION)197# ifndef __cpp_lib_associative_heterogeneous_erasure198# error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++23"199# endif200# if __cpp_lib_associative_heterogeneous_erasure != 202110L201# error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++23"202# endif203# else204# ifdef __cpp_lib_associative_heterogeneous_erasure205# error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"206# endif207# endif208 209# ifdef __cpp_lib_associative_heterogeneous_insertion210# error "__cpp_lib_associative_heterogeneous_insertion should not be defined before c++26"211# endif212 213# ifndef __cpp_lib_containers_ranges214# error "__cpp_lib_containers_ranges should be defined in c++23"215# endif216# if __cpp_lib_containers_ranges != 202202L217# error "__cpp_lib_containers_ranges should have the value 202202L in c++23"218# endif219 220# ifndef __cpp_lib_erase_if221# error "__cpp_lib_erase_if should be defined in c++23"222# endif223# if __cpp_lib_erase_if != 202002L224# error "__cpp_lib_erase_if should have the value 202002L in c++23"225# endif226 227# ifndef __cpp_lib_generic_associative_lookup228# error "__cpp_lib_generic_associative_lookup should be defined in c++23"229# endif230# if __cpp_lib_generic_associative_lookup != 201304L231# error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++23"232# endif233 234# ifndef __cpp_lib_node_extract235# error "__cpp_lib_node_extract should be defined in c++23"236# endif237# if __cpp_lib_node_extract != 201606L238# error "__cpp_lib_node_extract should have the value 201606L in c++23"239# endif240 241# ifndef __cpp_lib_nonmember_container_access242# error "__cpp_lib_nonmember_container_access should be defined in c++23"243# endif244# if __cpp_lib_nonmember_container_access != 201411L245# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"246# endif247 248#elif TEST_STD_VER > 23249 250# ifndef __cpp_lib_allocator_traits_is_always_equal251# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26"252# endif253# if __cpp_lib_allocator_traits_is_always_equal != 201411L254# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26"255# endif256 257# if !defined(_LIBCPP_VERSION)258# ifndef __cpp_lib_associative_heterogeneous_erasure259# error "__cpp_lib_associative_heterogeneous_erasure should be defined in c++26"260# endif261# if __cpp_lib_associative_heterogeneous_erasure != 202110L262# error "__cpp_lib_associative_heterogeneous_erasure should have the value 202110L in c++26"263# endif264# else265# ifdef __cpp_lib_associative_heterogeneous_erasure266# error "__cpp_lib_associative_heterogeneous_erasure should not be defined because it is unimplemented in libc++!"267# endif268# endif269 270# if !defined(_LIBCPP_VERSION)271# ifndef __cpp_lib_associative_heterogeneous_insertion272# error "__cpp_lib_associative_heterogeneous_insertion should be defined in c++26"273# endif274# if __cpp_lib_associative_heterogeneous_insertion != 202306L275# error "__cpp_lib_associative_heterogeneous_insertion should have the value 202306L in c++26"276# endif277# else278# ifdef __cpp_lib_associative_heterogeneous_insertion279# error "__cpp_lib_associative_heterogeneous_insertion should not be defined because it is unimplemented in libc++!"280# endif281# endif282 283# ifndef __cpp_lib_containers_ranges284# error "__cpp_lib_containers_ranges should be defined in c++26"285# endif286# if __cpp_lib_containers_ranges != 202202L287# error "__cpp_lib_containers_ranges should have the value 202202L in c++26"288# endif289 290# ifndef __cpp_lib_erase_if291# error "__cpp_lib_erase_if should be defined in c++26"292# endif293# if __cpp_lib_erase_if != 202002L294# error "__cpp_lib_erase_if should have the value 202002L in c++26"295# endif296 297# ifndef __cpp_lib_generic_associative_lookup298# error "__cpp_lib_generic_associative_lookup should be defined in c++26"299# endif300# if __cpp_lib_generic_associative_lookup != 201304L301# error "__cpp_lib_generic_associative_lookup should have the value 201304L in c++26"302# endif303 304# ifndef __cpp_lib_node_extract305# error "__cpp_lib_node_extract should be defined in c++26"306# endif307# if __cpp_lib_node_extract != 201606L308# error "__cpp_lib_node_extract should have the value 201606L in c++26"309# endif310 311# ifndef __cpp_lib_nonmember_container_access312# error "__cpp_lib_nonmember_container_access should be defined in c++26"313# endif314# if __cpp_lib_nonmember_container_access != 201411L315# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"316# endif317 318#endif // TEST_STD_VER > 23319 320// clang-format on321