From e47dda68bfaa4e01d65c981ac487dced901794f5 Mon Sep 17 00:00:00 2001 From: Aaron Dierking Date: Mon, 8 Oct 2018 15:11:23 -0700 Subject: [PATCH] Explicitly include crtdbg.h On Windows, MemoryIsNotDeallocated is accidentally relying upon crtdbg.h being pulled in through one of the C++ headers. If Google Test is built with an alternative C++ standard library (such as LLVM libc++), then this will not happen and compilation will fail. Ensure that crtdbg.h is always included for MSVC-compatible builds. --- googletest/src/gtest-port.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/googletest/src/gtest-port.cc b/googletest/src/gtest-port.cc index 91f285c6..aa98ddb1 100644 --- a/googletest/src/gtest-port.cc +++ b/googletest/src/gtest-port.cc @@ -41,6 +41,9 @@ # include # include # include // Used in ThreadLocal. +# ifdef _MSC_VER +# include +# endif // _MSC_VER #else # include #endif // GTEST_OS_WINDOWS