vector.version.pass.cpp (4186B)
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 // <vector> 14 15 // Test the feature test macros defined by <vector> 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_nonmember_container_access 201411L [C++17] 22 */ 23 24 #include <vector> 25 #include "test_macros.h" 26 27 #if TEST_STD_VER < 14 28 29 # ifdef __cpp_lib_allocator_traits_is_always_equal 30 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 31 # endif 32 33 # ifdef __cpp_lib_erase_if 34 # error "__cpp_lib_erase_if should not be defined before c++2a" 35 # endif 36 37 # ifdef __cpp_lib_incomplete_container_elements 38 # error "__cpp_lib_incomplete_container_elements should not be defined before c++17" 39 # endif 40 41 # ifdef __cpp_lib_nonmember_container_access 42 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 43 # endif 44 45 #elif TEST_STD_VER == 14 46 47 # ifdef __cpp_lib_allocator_traits_is_always_equal 48 # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17" 49 # endif 50 51 # ifdef __cpp_lib_erase_if 52 # error "__cpp_lib_erase_if should not be defined before c++2a" 53 # endif 54 55 # ifdef __cpp_lib_incomplete_container_elements 56 # error "__cpp_lib_incomplete_container_elements should not be defined before c++17" 57 # endif 58 59 # ifdef __cpp_lib_nonmember_container_access 60 # error "__cpp_lib_nonmember_container_access should not be defined before c++17" 61 # endif 62 63 #elif TEST_STD_VER == 17 64 65 # ifndef __cpp_lib_allocator_traits_is_always_equal 66 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17" 67 # endif 68 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 69 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17" 70 # endif 71 72 # ifdef __cpp_lib_erase_if 73 # error "__cpp_lib_erase_if should not be defined before c++2a" 74 # endif 75 76 # ifndef __cpp_lib_incomplete_container_elements 77 # error "__cpp_lib_incomplete_container_elements should be defined in c++17" 78 # endif 79 # if __cpp_lib_incomplete_container_elements != 201505L 80 # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++17" 81 # endif 82 83 # ifndef __cpp_lib_nonmember_container_access 84 # error "__cpp_lib_nonmember_container_access should be defined in c++17" 85 # endif 86 # if __cpp_lib_nonmember_container_access != 201411L 87 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17" 88 # endif 89 90 #elif TEST_STD_VER > 17 91 92 # ifndef __cpp_lib_allocator_traits_is_always_equal 93 # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2a" 94 # endif 95 # if __cpp_lib_allocator_traits_is_always_equal != 201411L 96 # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2a" 97 # endif 98 99 # ifndef __cpp_lib_erase_if 100 # error "__cpp_lib_erase_if should be defined in c++2a" 101 # endif 102 # if __cpp_lib_erase_if != 201811L 103 # error "__cpp_lib_erase_if should have the value 201811L in c++2a" 104 # endif 105 106 # ifndef __cpp_lib_incomplete_container_elements 107 # error "__cpp_lib_incomplete_container_elements should be defined in c++2a" 108 # endif 109 # if __cpp_lib_incomplete_container_elements != 201505L 110 # error "__cpp_lib_incomplete_container_elements should have the value 201505L in c++2a" 111 # endif 112 113 # ifndef __cpp_lib_nonmember_container_access 114 # error "__cpp_lib_nonmember_container_access should be defined in c++2a" 115 # endif 116 # if __cpp_lib_nonmember_container_access != 201411L 117 # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2a" 118 # endif 119 120 #endif // TEST_STD_VER > 17 121 122 int main() {}