set.version.pass.cpp 1.3 KB

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