libcxx

libcxx mirror with random patches
git clone https://git.neptards.moe/neptards/libcxx.git
Log | Files | Refs

deque.version.pass.cpp (3245B)


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