unordered_set.version.pass.cpp (4985B)
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 // <unordered_set> 14 15 // Test the feature test macros defined by <unordered_set> 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_generic_unordered_lookup 201811L [C++2a] 21 __cpp_lib_node_extract 201606L [C++17] 22 __cpp_lib_nonmember_container_access 201411L [C++17] 23 */ 24 25 #include <unordered_set> 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_generic_unordered_lookup 39 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" 40 # endif 41 42 # ifdef __cpp_lib_node_extract 43 # error "__cpp_lib_node_extract should not be defined before c++17" 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_generic_unordered_lookup 61 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" 62 # endif 63 64 # ifdef __cpp_lib_node_extract 65 # error "__cpp_lib_node_extract should not be defined before c++17" 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 # ifdef __cpp_lib_generic_unordered_lookup 86 # error "__cpp_lib_generic_unordered_lookup should not be defined before c++2a" 87 # endif 88 89 # ifndef __cpp_lib_node_extract 90 # error "__cpp_lib_node_extract should be defined in c++17" 91 # endif 92 # if __cpp_lib_node_extract != 201606L 93 # error "__cpp_lib_node_extract should have the value 201606L in c++17" 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 # if !defined(_LIBCPP_VERSION) 120 # ifndef __cpp_lib_generic_unordered_lookup 121 # error "__cpp_lib_generic_unordered_lookup should be defined in c++2a" 122 # endif 123 # if __cpp_lib_generic_unordered_lookup != 201811L 124 # error "__cpp_lib_generic_unordered_lookup should have the value 201811L in c++2a" 125 # endif 126 # else // _LIBCPP_VERSION 127 # ifdef __cpp_lib_generic_unordered_lookup 128 # error "__cpp_lib_generic_unordered_lookup should not be defined because it is unimplemented in libc++!" 129 # endif 130 # endif 131 132 # ifndef __cpp_lib_node_extract 133 # error "__cpp_lib_node_extract should be defined in c++2a" 134 # endif 135 # if __cpp_lib_node_extract != 201606L 136 # error "__cpp_lib_node_extract should have the value 201606L in c++2a" 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() {}