Skip to content

Commit

Permalink
Avoid reliance on <any> header without RTTI on MSVC
Browse files Browse the repository at this point in the history
Fixes: #4144
PiperOrigin-RevId: 509322023
Change-Id: I52bdf6c25ff433327e174d3f9583b3d50b872d58
  • Loading branch information
Abseil Team authored and Copybara-Service committed Feb 13, 2023
1 parent b73f27f commit b80a07f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion googletest/include/gtest/internal/gtest-port.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b80a07f

Please sign in to comment.