[test] Define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST in msvc_stdlib_force_include.hpp
...so the tests under test/std/utilities/any continue to
compile with MSVC's standard library.
While we're here, let's test >C++17 features when _HAS_CXX20.
llvm-svn: 351991
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: 1ecf6e55cd8b2ebeb506f5c5ce8080a616b4ac5b
diff --git a/test/support/msvc_stdlib_force_include.hpp b/test/support/msvc_stdlib_force_include.hpp
index c3dd3aa..fcf64d7 100644
--- a/test/support/msvc_stdlib_force_include.hpp
+++ b/test/support/msvc_stdlib_force_include.hpp
@@ -78,10 +78,14 @@
#include <ciso646>
-#if _HAS_CXX17
+#if _HAS_CXX20
+ #define TEST_STD_VER 99
+#elif _HAS_CXX17
#define TEST_STD_VER 17
-#else // _HAS_CXX17
+#else // !(_HAS_CXX20 || _HAS_CXX17)
#define TEST_STD_VER 14
-#endif // _HAS_CXX17
+#endif
+
+#define _LIBCPP_AVAILABILITY_THROW_BAD_ANY_CAST
#endif // SUPPORT_MSVC_STDLIB_FORCE_INCLUDE_HPP