204 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// <deque>13 14// Test the feature test macros defined by <deque>15 16// clang-format off17 18#include <deque>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_containers_ranges28# error "__cpp_lib_containers_ranges should not be defined before c++23"29# endif30 31# ifdef __cpp_lib_default_template_type_for_algorithm_values32# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"33# endif34 35# ifdef __cpp_lib_erase_if36# error "__cpp_lib_erase_if should not be defined before c++20"37# endif38 39# ifdef __cpp_lib_nonmember_container_access40# error "__cpp_lib_nonmember_container_access should not be defined before c++17"41# endif42 43#elif TEST_STD_VER == 1444 45# ifdef __cpp_lib_allocator_traits_is_always_equal46# error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"47# endif48 49# ifdef __cpp_lib_containers_ranges50# error "__cpp_lib_containers_ranges should not be defined before c++23"51# endif52 53# ifdef __cpp_lib_default_template_type_for_algorithm_values54# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"55# endif56 57# ifdef __cpp_lib_erase_if58# error "__cpp_lib_erase_if should not be defined before c++20"59# endif60 61# ifdef __cpp_lib_nonmember_container_access62# error "__cpp_lib_nonmember_container_access should not be defined before c++17"63# endif64 65#elif TEST_STD_VER == 1766 67# ifndef __cpp_lib_allocator_traits_is_always_equal68# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"69# endif70# if __cpp_lib_allocator_traits_is_always_equal != 201411L71# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"72# endif73 74# ifdef __cpp_lib_containers_ranges75# error "__cpp_lib_containers_ranges should not be defined before c++23"76# endif77 78# ifdef __cpp_lib_default_template_type_for_algorithm_values79# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"80# endif81 82# ifdef __cpp_lib_erase_if83# error "__cpp_lib_erase_if should not be defined before c++20"84# endif85 86# ifndef __cpp_lib_nonmember_container_access87# error "__cpp_lib_nonmember_container_access should be defined in c++17"88# endif89# if __cpp_lib_nonmember_container_access != 201411L90# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"91# endif92 93#elif TEST_STD_VER == 2094 95# ifndef __cpp_lib_allocator_traits_is_always_equal96# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++20"97# endif98# if __cpp_lib_allocator_traits_is_always_equal != 201411L99# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++20"100# endif101 102# ifdef __cpp_lib_containers_ranges103# error "__cpp_lib_containers_ranges should not be defined before c++23"104# endif105 106# ifdef __cpp_lib_default_template_type_for_algorithm_values107# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"108# endif109 110# ifndef __cpp_lib_erase_if111# error "__cpp_lib_erase_if should be defined in c++20"112# endif113# if __cpp_lib_erase_if != 202002L114# error "__cpp_lib_erase_if should have the value 202002L in c++20"115# endif116 117# ifndef __cpp_lib_nonmember_container_access118# error "__cpp_lib_nonmember_container_access should be defined in c++20"119# endif120# if __cpp_lib_nonmember_container_access != 201411L121# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++20"122# endif123 124#elif TEST_STD_VER == 23125 126# ifndef __cpp_lib_allocator_traits_is_always_equal127# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++23"128# endif129# if __cpp_lib_allocator_traits_is_always_equal != 201411L130# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++23"131# endif132 133# ifndef __cpp_lib_containers_ranges134# error "__cpp_lib_containers_ranges should be defined in c++23"135# endif136# if __cpp_lib_containers_ranges != 202202L137# error "__cpp_lib_containers_ranges should have the value 202202L in c++23"138# endif139 140# ifdef __cpp_lib_default_template_type_for_algorithm_values141# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined before c++26"142# endif143 144# ifndef __cpp_lib_erase_if145# error "__cpp_lib_erase_if should be defined in c++23"146# endif147# if __cpp_lib_erase_if != 202002L148# error "__cpp_lib_erase_if should have the value 202002L in c++23"149# endif150 151# ifndef __cpp_lib_nonmember_container_access152# error "__cpp_lib_nonmember_container_access should be defined in c++23"153# endif154# if __cpp_lib_nonmember_container_access != 201411L155# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++23"156# endif157 158#elif TEST_STD_VER > 23159 160# ifndef __cpp_lib_allocator_traits_is_always_equal161# error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++26"162# endif163# if __cpp_lib_allocator_traits_is_always_equal != 201411L164# error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++26"165# endif166 167# ifndef __cpp_lib_containers_ranges168# error "__cpp_lib_containers_ranges should be defined in c++26"169# endif170# if __cpp_lib_containers_ranges != 202202L171# error "__cpp_lib_containers_ranges should have the value 202202L in c++26"172# endif173 174# if !defined(_LIBCPP_VERSION)175# ifndef __cpp_lib_default_template_type_for_algorithm_values176# error "__cpp_lib_default_template_type_for_algorithm_values should be defined in c++26"177# endif178# if __cpp_lib_default_template_type_for_algorithm_values != 202403L179# error "__cpp_lib_default_template_type_for_algorithm_values should have the value 202403L in c++26"180# endif181# else182# ifdef __cpp_lib_default_template_type_for_algorithm_values183# error "__cpp_lib_default_template_type_for_algorithm_values should not be defined because it is unimplemented in libc++!"184# endif185# endif186 187# ifndef __cpp_lib_erase_if188# error "__cpp_lib_erase_if should be defined in c++26"189# endif190# if __cpp_lib_erase_if != 202002L191# error "__cpp_lib_erase_if should have the value 202002L in c++26"192# endif193 194# ifndef __cpp_lib_nonmember_container_access195# error "__cpp_lib_nonmember_container_access should be defined in c++26"196# endif197# if __cpp_lib_nonmember_container_access != 201411L198# error "__cpp_lib_nonmember_container_access should have the value 201411L in c++26"199# endif200 201#endif // TEST_STD_VER > 23202 203// clang-format on204