* [gentoo-commits] gentoo-x86 commit in dev-cpp/gmock/files: gmock-1.4.0-gcc-4.7.patch
@ 2012-05-30 20:03 Mike Frysinger (vapier)
0 siblings, 0 replies; only message in thread
From: Mike Frysinger (vapier) @ 2012-05-30 20:03 UTC (permalink / raw
To: gentoo-commits
vapier 12/05/30 20:03:47
Added: gmock-1.4.0-gcc-4.7.patch
Log:
Fix via ChromiumOS from upstream for building with gcc-4.7.
(Portage version: HEAD/cvs/Linux x86_64)
Revision Changes Path
1.1 dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch?rev=1.1&content-type=text/plain
Index: gmock-1.4.0-gcc-4.7.patch
===================================================================
taken from upstream repo
Index: include/gmock/gmock-generated-function-mockers.h.pump
===================================================================
--- include/gmock/gmock-generated-function-mockers.h.pump (revision 227)
+++ include/gmock/gmock-generated-function-mockers.h.pump (revision 228)
@@ -45,10 +45,6 @@ $var n = 10 $$ The maximum arity we sup
#include <gmock/internal/gmock-internal-utils.h>
namespace testing {
-
-template <typename F>
-class MockSpec;
-
namespace internal {
template <typename F>
@@ -89,7 +85,11 @@ $if i >= 1 [[
}
R Invoke($Aas) {
- return InvokeWith(ArgumentTuple($as));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple($as));
}
};
Index: include/gmock/gmock-generated-function-mockers.h
===================================================================
--- include/gmock/gmock-generated-function-mockers.h (revision 227)
+++ include/gmock/gmock-generated-function-mockers.h (revision 228)
@@ -42,10 +42,6 @@
#include <gmock/internal/gmock-internal-utils.h>
namespace testing {
-
-template <typename F>
-class MockSpec;
-
namespace internal {
template <typename F>
@@ -71,7 +67,11 @@ class FunctionMocker<R()> : public
}
R Invoke() {
- return InvokeWith(ArgumentTuple());
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple());
}
};
@@ -88,7 +88,11 @@ class FunctionMocker<R(A1)> : public
}
R Invoke(A1 a1) {
- return InvokeWith(ArgumentTuple(a1));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1));
}
};
@@ -105,7 +109,11 @@ class FunctionMocker<R(A1, A2)> : public
}
R Invoke(A1 a1, A2 a2) {
- return InvokeWith(ArgumentTuple(a1, a2));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2));
}
};
@@ -123,7 +131,11 @@ class FunctionMocker<R(A1, A2, A3)> : pu
}
R Invoke(A1 a1, A2 a2, A3 a3) {
- return InvokeWith(ArgumentTuple(a1, a2, a3));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3));
}
};
@@ -141,7 +153,11 @@ class FunctionMocker<R(A1, A2, A3, A4)>
}
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4));
}
};
@@ -161,7 +177,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A
}
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5));
}
};
@@ -182,7 +202,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A
}
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6));
}
};
@@ -203,7 +227,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A
}
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7));
}
};
@@ -224,7 +252,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A
}
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8));
}
};
@@ -246,7 +278,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A
}
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9));
}
};
@@ -270,7 +306,12 @@ class FunctionMocker<R(A1, A2, A3, A4, A
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9,
A10 a10) {
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10));
+ // Even though gcc and MSVC don't enforce it, 'this->' is required
+ // by the C++ standard [14.6.4] here, as the base class type is
+ // dependent on the template argument (and thus shouldn't be
+ // looked into when resolving InvokeWith).
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9,
+ a10));
}
};
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-30 20:04 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-30 20:03 [gentoo-commits] gentoo-x86 commit in dev-cpp/gmock/files: gmock-1.4.0-gcc-4.7.patch Mike Frysinger (vapier)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox