map.version.pass.cpp 1.3 KB

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