vector.version.pass.cpp 1.2 KB

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