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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user