Skip to content

Commit 82199c7

Browse files
committed
Fixed gtest compilation with MSVC
1 parent a888edf commit 82199c7

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/gtest/include/gtest/internal/gtest-port.h

+5-2
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,11 @@ struct _RTL_CRITICAL_SECTION;
628628
#ifndef GTEST_HAS_TR1_TUPLE
629629
# if GTEST_OS_LINUX_ANDROID && defined(_STLPORT_MAJOR)
630630
// STLport, provided with the Android NDK, has neither <tr1/tuple> or <tuple>.
631-
# define GTEST_HAS_TR1_TUPLE 0
632-
# else
631+
#define GTEST_HAS_TR1_TUPLE 0
632+
#elif defined(_MSC_VER)
633+
// Don't use tr1 with MSVC - it results in compiler error.
634+
#define GTEST_HAS_TR1_TUPLE 0
635+
#else
633636
// The user didn't tell us not to do it, so we assume it's OK.
634637
# define GTEST_HAS_TR1_TUPLE 1
635638
# endif

0 commit comments

Comments
 (0)