src/3rdparty: Port doctest fix for including <ciso646> from upstream

This has been failing on our weekly builds for a bit. It's fixed upstream
but there's no idea when they'll release a new version that includes it.

This cherry-picks 5eb20178ba
This commit is contained in:
Tim Wojtulewicz 2025-09-08 09:44:05 -07:00
parent 08b018cc61
commit 663fc2931c

View file

@ -490,13 +490,17 @@ DOCTEST_GCC_SUPPRESS_WARNING_POP
#endif #endif
#endif // DOCTEST_CONFIG_USE_IOSFWD #endif // DOCTEST_CONFIG_USE_IOSFWD
// for clang - always include ciso646 (which drags some std stuff) because // for clang - always include <version> or <ciso646> (which drags some std stuff)
// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in // because we want to check if we are using libc++ with the _LIBCPP_VERSION macro in
// which case we don't want to forward declare stuff from std - for reference: // which case we don't want to forward declare stuff from std - for reference:
// https://github.com/doctest/doctest/issues/126 // https://github.com/doctest/doctest/issues/126
// https://github.com/doctest/doctest/issues/356 // https://github.com/doctest/doctest/issues/356
#if DOCTEST_CLANG #if DOCTEST_CLANG
#if DOCTEST_CPLUSPLUS >= 201703L && __has_include(<version>)
#include <version>
#else
#include <ciso646> #include <ciso646>
#endif
#endif // clang #endif // clang
#ifdef _LIBCPP_VERSION #ifdef _LIBCPP_VERSION