From 663fc2931cdf81816f2c43de23fbb3a62e434790 Mon Sep 17 00:00:00 2001 From: Tim Wojtulewicz Date: Mon, 8 Sep 2025 09:44:05 -0700 Subject: [PATCH] src/3rdparty: Port doctest fix for including 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 https://github.com/doctest/doctest/commit/5eb20178ba43d7b3fd6dbf97b4d2a0907b59a42a --- src/3rdparty/doctest.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/doctest.h b/src/3rdparty/doctest.h index f297fa0b24..6c92f6394d 100644 --- a/src/3rdparty/doctest.h +++ b/src/3rdparty/doctest.h @@ -490,13 +490,17 @@ DOCTEST_GCC_SUPPRESS_WARNING_POP #endif #endif // DOCTEST_CONFIG_USE_IOSFWD -// for clang - always include ciso646 (which drags some std stuff) because -// we want to check if we are using libc++ with the _LIBCPP_VERSION macro in +// for clang - always include or (which drags some std stuff) +// 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: // https://github.com/doctest/doctest/issues/126 // https://github.com/doctest/doctest/issues/356 #if DOCTEST_CLANG +#if DOCTEST_CPLUSPLUS >= 201703L && __has_include() +#include +#else #include +#endif #endif // clang #ifdef _LIBCPP_VERSION