deque.version.pass.cpp 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  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-exception
  6. //
  7. //===----------------------------------------------------------------------===//
  8. //
  9. // WARNING: This test was generated by generate_feature_test_macro_components.py
  10. // and should not be edited manually.
  11. // <deque>
  12. // Test the feature test macros defined by <deque>
  13. /* Constant Value
  14. __cpp_lib_allocator_traits_is_always_equal 201411L [C++17]
  15. __cpp_lib_erase_if 201811L [C++2a]
  16. __cpp_lib_nonmember_container_access 201411L [C++17]
  17. */
  18. #include <deque>
  19. #include "test_macros.h"
  20. #if TEST_STD_VER < 14
  21. # ifdef __cpp_lib_allocator_traits_is_always_equal
  22. # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
  23. # endif
  24. # ifdef __cpp_lib_erase_if
  25. # error "__cpp_lib_erase_if should not be defined before c++2a"
  26. # endif
  27. # ifdef __cpp_lib_nonmember_container_access
  28. # error "__cpp_lib_nonmember_container_access should not be defined before c++17"
  29. # endif
  30. #elif TEST_STD_VER == 14
  31. # ifdef __cpp_lib_allocator_traits_is_always_equal
  32. # error "__cpp_lib_allocator_traits_is_always_equal should not be defined before c++17"
  33. # endif
  34. # ifdef __cpp_lib_erase_if
  35. # error "__cpp_lib_erase_if should not be defined before c++2a"
  36. # endif
  37. # ifdef __cpp_lib_nonmember_container_access
  38. # error "__cpp_lib_nonmember_container_access should not be defined before c++17"
  39. # endif
  40. #elif TEST_STD_VER == 17
  41. # ifndef __cpp_lib_allocator_traits_is_always_equal
  42. # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++17"
  43. # endif
  44. # if __cpp_lib_allocator_traits_is_always_equal != 201411L
  45. # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++17"
  46. # endif
  47. # ifdef __cpp_lib_erase_if
  48. # error "__cpp_lib_erase_if should not be defined before c++2a"
  49. # endif
  50. # ifndef __cpp_lib_nonmember_container_access
  51. # error "__cpp_lib_nonmember_container_access should be defined in c++17"
  52. # endif
  53. # if __cpp_lib_nonmember_container_access != 201411L
  54. # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++17"
  55. # endif
  56. #elif TEST_STD_VER > 17
  57. # ifndef __cpp_lib_allocator_traits_is_always_equal
  58. # error "__cpp_lib_allocator_traits_is_always_equal should be defined in c++2a"
  59. # endif
  60. # if __cpp_lib_allocator_traits_is_always_equal != 201411L
  61. # error "__cpp_lib_allocator_traits_is_always_equal should have the value 201411L in c++2a"
  62. # endif
  63. # ifndef __cpp_lib_erase_if
  64. # error "__cpp_lib_erase_if should be defined in c++2a"
  65. # endif
  66. # if __cpp_lib_erase_if != 201811L
  67. # error "__cpp_lib_erase_if should have the value 201811L in c++2a"
  68. # endif
  69. # ifndef __cpp_lib_nonmember_container_access
  70. # error "__cpp_lib_nonmember_container_access should be defined in c++2a"
  71. # endif
  72. # if __cpp_lib_nonmember_container_access != 201411L
  73. # error "__cpp_lib_nonmember_container_access should have the value 201411L in c++2a"
  74. # endif
  75. #endif // TEST_STD_VER > 17
  76. int main(int, char**) { return 0; }