1 |
vapier 12/05/30 20:03:47 |
2 |
|
3 |
Added: gmock-1.4.0-gcc-4.7.patch |
4 |
Log: |
5 |
Fix via ChromiumOS from upstream for building with gcc-4.7. |
6 |
|
7 |
(Portage version: HEAD/cvs/Linux x86_64) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 dev-cpp/gmock/files/gmock-1.4.0-gcc-4.7.patch |
11 |
|
12 |
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 |
13 |
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 |
14 |
|
15 |
Index: gmock-1.4.0-gcc-4.7.patch |
16 |
=================================================================== |
17 |
taken from upstream repo |
18 |
|
19 |
Index: include/gmock/gmock-generated-function-mockers.h.pump |
20 |
=================================================================== |
21 |
--- include/gmock/gmock-generated-function-mockers.h.pump (revision 227) |
22 |
+++ include/gmock/gmock-generated-function-mockers.h.pump (revision 228) |
23 |
@@ -45,10 +45,6 @@ $var n = 10 $$ The maximum arity we sup |
24 |
#include <gmock/internal/gmock-internal-utils.h> |
25 |
|
26 |
namespace testing { |
27 |
- |
28 |
-template <typename F> |
29 |
-class MockSpec; |
30 |
- |
31 |
namespace internal { |
32 |
|
33 |
template <typename F> |
34 |
@@ -89,7 +85,11 @@ $if i >= 1 [[ |
35 |
} |
36 |
|
37 |
R Invoke($Aas) { |
38 |
- return InvokeWith(ArgumentTuple($as)); |
39 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
40 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
41 |
+ // dependent on the template argument (and thus shouldn't be |
42 |
+ // looked into when resolving InvokeWith). |
43 |
+ return this->InvokeWith(ArgumentTuple($as)); |
44 |
} |
45 |
}; |
46 |
|
47 |
Index: include/gmock/gmock-generated-function-mockers.h |
48 |
=================================================================== |
49 |
--- include/gmock/gmock-generated-function-mockers.h (revision 227) |
50 |
+++ include/gmock/gmock-generated-function-mockers.h (revision 228) |
51 |
@@ -42,10 +42,6 @@ |
52 |
#include <gmock/internal/gmock-internal-utils.h> |
53 |
|
54 |
namespace testing { |
55 |
- |
56 |
-template <typename F> |
57 |
-class MockSpec; |
58 |
- |
59 |
namespace internal { |
60 |
|
61 |
template <typename F> |
62 |
@@ -71,7 +67,11 @@ class FunctionMocker<R()> : public |
63 |
} |
64 |
|
65 |
R Invoke() { |
66 |
- return InvokeWith(ArgumentTuple()); |
67 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
68 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
69 |
+ // dependent on the template argument (and thus shouldn't be |
70 |
+ // looked into when resolving InvokeWith). |
71 |
+ return this->InvokeWith(ArgumentTuple()); |
72 |
} |
73 |
}; |
74 |
|
75 |
@@ -88,7 +88,11 @@ class FunctionMocker<R(A1)> : public |
76 |
} |
77 |
|
78 |
R Invoke(A1 a1) { |
79 |
- return InvokeWith(ArgumentTuple(a1)); |
80 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
81 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
82 |
+ // dependent on the template argument (and thus shouldn't be |
83 |
+ // looked into when resolving InvokeWith). |
84 |
+ return this->InvokeWith(ArgumentTuple(a1)); |
85 |
} |
86 |
}; |
87 |
|
88 |
@@ -105,7 +109,11 @@ class FunctionMocker<R(A1, A2)> : public |
89 |
} |
90 |
|
91 |
R Invoke(A1 a1, A2 a2) { |
92 |
- return InvokeWith(ArgumentTuple(a1, a2)); |
93 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
94 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
95 |
+ // dependent on the template argument (and thus shouldn't be |
96 |
+ // looked into when resolving InvokeWith). |
97 |
+ return this->InvokeWith(ArgumentTuple(a1, a2)); |
98 |
} |
99 |
}; |
100 |
|
101 |
@@ -123,7 +131,11 @@ class FunctionMocker<R(A1, A2, A3)> : pu |
102 |
} |
103 |
|
104 |
R Invoke(A1 a1, A2 a2, A3 a3) { |
105 |
- return InvokeWith(ArgumentTuple(a1, a2, a3)); |
106 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
107 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
108 |
+ // dependent on the template argument (and thus shouldn't be |
109 |
+ // looked into when resolving InvokeWith). |
110 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3)); |
111 |
} |
112 |
}; |
113 |
|
114 |
@@ -141,7 +153,11 @@ class FunctionMocker<R(A1, A2, A3, A4)> |
115 |
} |
116 |
|
117 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4) { |
118 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4)); |
119 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
120 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
121 |
+ // dependent on the template argument (and thus shouldn't be |
122 |
+ // looked into when resolving InvokeWith). |
123 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4)); |
124 |
} |
125 |
}; |
126 |
|
127 |
@@ -161,7 +177,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A |
128 |
} |
129 |
|
130 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { |
131 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5)); |
132 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
133 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
134 |
+ // dependent on the template argument (and thus shouldn't be |
135 |
+ // looked into when resolving InvokeWith). |
136 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5)); |
137 |
} |
138 |
}; |
139 |
|
140 |
@@ -182,7 +202,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A |
141 |
} |
142 |
|
143 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { |
144 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6)); |
145 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
146 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
147 |
+ // dependent on the template argument (and thus shouldn't be |
148 |
+ // looked into when resolving InvokeWith). |
149 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6)); |
150 |
} |
151 |
}; |
152 |
|
153 |
@@ -203,7 +227,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A |
154 |
} |
155 |
|
156 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { |
157 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7)); |
158 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
159 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
160 |
+ // dependent on the template argument (and thus shouldn't be |
161 |
+ // looked into when resolving InvokeWith). |
162 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7)); |
163 |
} |
164 |
}; |
165 |
|
166 |
@@ -224,7 +252,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A |
167 |
} |
168 |
|
169 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8) { |
170 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8)); |
171 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
172 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
173 |
+ // dependent on the template argument (and thus shouldn't be |
174 |
+ // looked into when resolving InvokeWith). |
175 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8)); |
176 |
} |
177 |
}; |
178 |
|
179 |
@@ -246,7 +278,11 @@ class FunctionMocker<R(A1, A2, A3, A4, A |
180 |
} |
181 |
|
182 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9) { |
183 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9)); |
184 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
185 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
186 |
+ // dependent on the template argument (and thus shouldn't be |
187 |
+ // looked into when resolving InvokeWith). |
188 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9)); |
189 |
} |
190 |
}; |
191 |
|
192 |
@@ -270,7 +306,12 @@ class FunctionMocker<R(A1, A2, A3, A4, A |
193 |
|
194 |
R Invoke(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7, A8 a8, A9 a9, |
195 |
A10 a10) { |
196 |
- return InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9, a10)); |
197 |
+ // Even though gcc and MSVC don't enforce it, 'this->' is required |
198 |
+ // by the C++ standard [14.6.4] here, as the base class type is |
199 |
+ // dependent on the template argument (and thus shouldn't be |
200 |
+ // looked into when resolving InvokeWith). |
201 |
+ return this->InvokeWith(ArgumentTuple(a1, a2, a3, a4, a5, a6, a7, a8, a9, |
202 |
+ a10)); |
203 |
} |
204 |
}; |