xref: /trunk/ext_libraries/gtest/use-own-tuple.patch (revision 91144cd0085a7583d2099b982122deb2184ab956)
1--- misc/gtest-1.7.0/include/gtest/internal/gtest-port.h
2+++ misc/build/gtest-1.7.0/include/gtest/internal/gtest-port.h
3@@ -76,6 +76,17 @@
4 //                              Test's own tr1 tuple implementation should be
5 //                              used.  Unused when the user sets
6 //                              GTEST_HAS_TR1_TUPLE to 0.
7+
8+/*  VS2008 ships its own <tr1/tuple> only in a Feature Pack that cannot be
9+    assumed present, so Google Test has to use its bundled tuple there.
10+    From VS2010 on the detection further down gets this right unaided, and
11+    forcing the bundled one is actively wrong on a toolset that has no
12+    std::tr1 at all: gtest-tuple.h then tries to define into a namespace
13+    the standard library no longer owns (C2888), and collides with the
14+    real <tuple>. */
15+#if defined(_MSC_VER) && (_MSC_VER < 1600)
16+#define GTEST_USE_OWN_TR1_TUPLE 1
17+#endif
18 //   GTEST_LANG_CXX11         - Define it to 1/0 to indicate that Google Test
19 //                              is building in C++11/C++98 mode.
20 //   GTEST_LINKED_AS_SHARED_LIBRARY
21