list.version.pass.cpp (5150B)
1 //===----------------------------------------------------------------------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is dual licensed under the MIT and the University of Illinois Open 6 // Source Licenses. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 // 10 // WARNING: This test was generated by generate_feature_test_macro_components.py 11 // and should not be edited manually. 12 13 // <list> 14 15 // Test the feature test macros defined by <list> 16 17 /* Constant Value 18 __cpp_lib_allocator_traits_is_always_equal 201411L [C++17] 19 __cpp_lib_erase_if 201811L [C++2a] 20 __cpp_lib_incomplete_container_elements 201505L [C++17] 21 __cpp_lib_list_remove_return_type 201806L [C++2a] 22 __cpp_lib_nonmember_container_access 201411L [C++17] 23 */ 24 25 #include <list> 26 #include "test_macros.h" 27 28 #if TEST_STD_VER < 14 29 30 # ifdef __cpp_lib_allocator_traits_is_always_equal 31 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 32 # endif 33 34 # ifdef __cpp_lib_erase_if 35 # error "__cpp_lib_erase_if should not be defined before c++2a" 36 # endif 37 38 # ifdef __cpp_lib_incomplete_container_elements 39 # error "__cpp_lib_incomplete_container_elements should not be defined before c++17" 40 # endif 41 42 # ifdef __cpp_lib_list_remove_return_type 43 # error "__cpp_lib_list_remove_return_type should not be defined before c++2a" 44 # endif 45 46 # ifdef __cpp_lib_nonmember_container_access 47 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 48 # endif 49 50 #elif TEST_STD_VER == 14 51 52 # ifdef __cpp_lib_allocator_traits_is_always_equal 53 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 54 # endif 55 56 # ifdef __cpp_lib_erase_if 57 # error "__cpp_lib_erase_if should not be defined before c++2a" 58 # endif 59 60 # ifdef __cpp_lib_incomplete_container_elements 61 # error "__cpp_lib_incomplete_container_elements should not be defined before c++17" 62 # endif 63 64 # ifdef __cpp_lib_list_remove_return_type 65 # error "__cpp_lib_list_remove_return_type should not be defined before c++2a" 66 # endif 67 68 # ifdef __cpp_lib_nonmember_container_access 69 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 70 # endif 71 72 #elif TEST_STD_VER == 17 73 74 # ifndef __cpp_lib_allocator_traits_is_always_equal 75 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 76 # endif 77 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 78 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 79 # endif 80 81 # ifdef __cpp_lib_erase_if 82 # error "__cpp_lib_erase_if should not be defined before c++2a" 83 # endif 84 85 # ifndef __cpp_lib_incomplete_container_elements 86 # error "__cpp_lib_incomplete_container_elements should be defined in c++17" 87 # endif 88 # if __cpp_lib_incomplete_container_elements != 201505L 89 # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++17" 90 # endif 91 92 # ifdef __cpp_lib_list_remove_return_type 93 # error "__cpp_lib_list_remove_return_type should not be defined before c++2a" 94 # endif 95 96 # ifndef __cpp_lib_nonmember_container_access 97 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 98 # endif 99 # if __cpp_lib_nonmember_container_access != 201411L 100 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 101 # endif 102 103 #elif TEST_STD_VER > 17 104 105 # ifndef __cpp_lib_allocator_traits_is_always_equal 106 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2a" 107 # endif 108 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 109 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2a" 110 # endif 111 112 # ifndef __cpp_lib_erase_if 113 # error "__cpp_lib_erase_if should be defined in c++2a" 114 # endif 115 # if __cpp_lib_erase_if != 201811L 116 # error "__cpp_lib_erase_if should have the value 201811L in c++2a" 117 # endif 118 119 # ifndef __cpp_lib_incomplete_container_elements 120 # error "__cpp_lib_incomplete_container_elements should be defined in c++2a" 121 # endif 122 # if __cpp_lib_incomplete_container_elements != 201505L 123 # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++2a" 124 # endif 125 126 # if !defined(_LIBCPP_VERSION) 127 # ifndef __cpp_lib_list_remove_return_type 128 # error "__cpp_lib_list_remove_return_type should be defined in c++2a" 129 # endif 130 # if __cpp_lib_list_remove_return_type != 201806L 131 # error "__cpp_lib_list_remove_return_type should have the value 201806L in c++2a" 132 # endif 133 # else // _LIBCPP_VERSION 134 # ifdef __cpp_lib_list_remove_return_type 135 # error "__cpp_lib_list_remove_return_type should not be defined because it is unimplemented in libc++!" 136 # endif 137 # endif 138 139 # ifndef __cpp_lib_nonmember_container_access 140 # error "__cpp_lib_nonmember_container_access should be defined in c++2a" 141 # endif 142 # if __cpp_lib_nonmember_container_access != 201411L 143 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2a" 144 # endif 145 146 #endif // TEST_STD_VER > 17 147 148 int main() {}