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