summaryrefslogtreecommitdiffstats
path: root/googletest/include/gtest/internal/gtest-port.h
diff options
context:
space:
mode:
authorAbseil Team <absl-team@google.com>2023-02-13 21:45:19 (GMT)
committerCopybara-Service <copybara-worker@google.com>2023-02-13 21:46:03 (GMT)
commitb80a07ffe627b20781516f51c548367d1e4d57dd (patch)
tree0b8d703e692642bb1f18d54d2a30b37834e29a62 /googletest/include/gtest/internal/gtest-port.h
parentb73f27fd164456fea9aba56163f5511355a03272 (diff)
downloadgoogletest-b80a07ffe627b20781516f51c548367d1e4d57dd.zip
googletest-b80a07ffe627b20781516f51c548367d1e4d57dd.tar.gz
googletest-b80a07ffe627b20781516f51c548367d1e4d57dd.tar.bz2
Avoid reliance on <any> header without RTTI on MSVC
Fixes: #4144 PiperOrigin-RevId: 509322023 Change-Id: I52bdf6c25ff433327e174d3f9583b3d50b872d58
Diffstat (limited to 'googletest/include/gtest/internal/gtest-port.h')
-rw-r--r--googletest/include/gtest/internal/gtest-port.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h
index b4fa3f0..bedd67d 100644
--- a/googletest/include/gtest/internal/gtest-port.h
+++ b/googletest/include/gtest/internal/gtest-port.h
@@ -2352,7 +2352,8 @@ using Any = ::absl::any;
} // namespace testing
#else
#ifdef __has_include
-#if __has_include(<any>) && __cplusplus >= 201703L
+#if __has_include(<any>) && __cplusplus >= 201703L && \
+ (!defined(_MSC_VER) || GTEST_HAS_RTTI)
// Otherwise for C++17 and higher use std::any for UniversalPrinter<>
// specializations.
#define GTEST_INTERNAL_HAS_ANY 1