aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-05-05 19:36:44 +0000
committerzhanyong.wan <zhanyong.wan@8415998a-534a-0410-bf83-d39667b30386>2009-05-05 19:36:44 +0000
commit125783fb87488239c062422bece2a9302489aafd (patch)
tree102cac633ddeaa0b0ebd964f6af905582351e877
parentbf0d0a44812f97449d7401d0eeb8da954f76ba2a (diff)
downloadgoogletest-125783fb87488239c062422bece2a9302489aafd.tar.gz
googletest-125783fb87488239c062422bece2a9302489aafd.tar.bz2
googletest-125783fb87488239c062422bece2a9302489aafd.zip
Fixes tr1 tuple's path when compiled with gcc version < 4.0.0 (by Zhanyong Wan).
-rw-r--r--include/gmock/internal/gmock-port.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/include/gmock/internal/gmock-port.h b/include/gmock/internal/gmock-port.h
index b98cb113..cad195ad 100644
--- a/include/gmock/internal/gmock-port.h
+++ b/include/gmock/internal/gmock-port.h
@@ -48,12 +48,14 @@
// To avoid conditional compilation everywhere, we make it
// gmock-port.h's responsibility to #include the header implementing
// tr1/tuple.
-#if defined(__GNUC__)
-// GCC implements tr1/tuple in the <tr1/tuple> header. This does not
-// conform to the TR1 spec, which requires the header to be <tuple>.
+#if defined(__GNUC__) && GTEST_GCC_VER_ >= 40000
+// GTEST_GCC_VER_ is defined in gtest-port.h and 40000 corresponds to
+// version 4.0.0.
+// GCC 4.0+ implements tr1/tuple in the <tr1/tuple> header. This does
+// not conform to the TR1 spec, which requires the header to be <tuple>.
#include <tr1/tuple>
#else
-// If the compiler is not GCC, we assume the user is using a
+// If the compiler is not GCC 4.0+, we assume the user is using a
// spec-conforming TR1 implementation.
#include <tuple>
#endif // __GNUC__