deque.version.pass.cpp 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // <deque> feature macros
  11. /* Constant Value
  12. __cpp_lib_allocator_traits_is_always_equal 201411L
  13. __cpp_lib_erase_if 201811L
  14. __cpp_lib_nonmember_container_access 201411L
  15. */
  16. #include <deque>
  17. #include <cassert>
  18. #include "test_macros.h"
  19. int main()
  20. {
  21. // ensure that the macros that are supposed to be defined in <deque> are defined.
  22. #if TEST_STD_VER > 17
  23. # if !defined(__cpp_lib_erase_if)
  24. LIBCPP_STATIC_ASSERT(false, "__cpp_lib_erase_if is not defined");
  25. # else
  26. # if __cpp_lib_erase_if < 201811L
  27. # error "__cpp_lib_erase_if has an invalid value"
  28. # endif
  29. # endif
  30. #endif
  31. /*
  32. #if !defined(__cpp_lib_fooby)
  33. # error "__cpp_lib_fooby is not defined"
  34. #elif __cpp_lib_fooby < 201606L
  35. # error "__cpp_lib_fooby has an invalid value"
  36. #endif
  37. */
  38. }