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.
This commit is contained in:
Aaron Dierking
2018-10-09 11:45:14 -07:00
parent a31d6f9057
commit e47dda68bf
+3
View File
@@ -41,6 +41,9 @@
# include <io.h>
# include <sys/stat.h>
# include <map> // Used in ThreadLocal.
# ifdef _MSC_VER
# include <crtdbg.h>
# endif // _MSC_VER
#else
# include <unistd.h>
#endif // GTEST_OS_WINDOWS