Index: testing/gmock/include/gmock/gmock-generated-function-mockers.h.pump |
diff --git a/testing/gmock/include/gmock/gmock-generated-function-mockers.h.pump b/testing/gmock/include/gmock/gmock-generated-function-mockers.h.pump |
index 3c845632a8210a07c6b2585b8dbbd7b12a9f26ab..619debd262f486c100fe9895896c253a16e35c91 100644 |
--- a/testing/gmock/include/gmock/gmock-generated-function-mockers.h.pump |
+++ b/testing/gmock/include/gmock/gmock-generated-function-mockers.h.pump |
@@ -45,10 +45,6 @@ $var n = 10 $$ The maximum arity we support. |
#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)); |
} |
}; |
@@ -242,7 +242,12 @@ $range j 0..i-1 |
template <typename R$for j [[, typename A$j]]> |
class MockFunction<R($for j, [[A$j]])> { |
public: |
+ MockFunction() {} |
+ |
MOCK_METHOD$i[[]]_T(Call, R($for j, [[A$j]])); |
+ |
+ private: |
+ GTEST_DISALLOW_COPY_AND_ASSIGN_(MockFunction); |
}; |