0000-ciso646-version.patch 1.1 KB

123456789101112131415161718192021222324252627
  1. diff --git a/thirdparty/doctest/doctest.h b/thirdparty/doctest/doctest.h
  2. index 5c754cde08a..482749ccb2b 100644
  3. --- a/thirdparty/doctest/doctest.h
  4. +++ b/thirdparty/doctest/doctest.h
  5. @@ -490,14 +490,20 @@ DOCTEST_GCC_SUPPRESS_WARNING_POP
  6. #endif
  7. #endif // DOCTEST_CONFIG_USE_IOSFWD
  8. -// for clang - always include ciso646 (which drags some std stuff) because
  9. -// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
  10. +// BEGIN TEMPORARY PATCH (comes from https://github.com/doctest/doctest/pull/901)
  11. +// for clang - always include <version> or <ciso646> (which drags some std stuff)
  12. +// because we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
  13. // which case we don't want to forward declare stuff from std - for reference:
  14. // https://github.com/doctest/doctest/issues/126
  15. // https://github.com/doctest/doctest/issues/356
  16. #if DOCTEST_CLANG
  17. +#if DOCTEST_CPLUSPLUS >= 201703L && __has_include(<version>)
  18. +#include <version>
  19. +#else
  20. #include <ciso646>
  21. +#endif
  22. #endif // clang
  23. +// END TEMPORARY PATCH
  24. #ifdef _LIBCPP_VERSION
  25. #ifndef DOCTEST_CONFIG_USE_STD_HEADERS