filesystem.version.pass.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. // <filesystem> feature macros
  11. /* Constant Value
  12. __cpp_lib_filesystem 201703L
  13. */
  14. #include <filesystem>
  15. #include "test_macros.h"
  16. int main()
  17. {
  18. // ensure that the macros that are supposed to be defined in <filesystem> are defined.
  19. #if _TEST_STD_VER > 14
  20. # if !defined(__cpp_lib_filesystem)
  21. # error "__cpp_lib_filesystem is not defined"
  22. # elif __cpp_lib_filesystem < 201703L
  23. # error "__cpp_lib_filesystem has an invalid value"
  24. # endif
  25. #endif
  26. /*
  27. #if !defined(__cpp_lib_fooby)
  28. # error "__cpp_lib_fooby is not defined"
  29. #elif __cpp_lib_fooby < 201606L
  30. # error "__cpp_lib_fooby has an invalid value"
  31. #endif
  32. */
  33. }