@@ -48,6 +48,48 @@ T bound_func1(Thing<T> *t, T a0) { return t->t | a0; }
48
48
template <typename T>
49
49
T bound_func0 (Thing<T> *t) { return t->t ; }
50
50
51
+ // const bound functions
52
+ template <typename T>
53
+ T const_func5 (const Thing<T> *t, T a0, T a1, T a2, T a3, T a4) { return t->t | a0 | a1 | a2 | a3 | a4; }
54
+ template <typename T>
55
+ T const_func4 (const Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
56
+ template <typename T>
57
+ T const_func3 (const Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
58
+ template <typename T>
59
+ T const_func2 (const Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
60
+ template <typename T>
61
+ T const_func1 (const Thing<T> *t, T a0) { return t->t | a0; }
62
+ template <typename T>
63
+ T const_func0 (const Thing<T> *t) { return t->t ; }
64
+
65
+ // volatile bound functions
66
+ template <typename T>
67
+ T volatile_func5 (volatile Thing<T> *t, T a0, T a1, T a2, T a3, T a4) { return t->t | a0 | a1 | a2 | a3 | a4; }
68
+ template <typename T>
69
+ T volatile_func4 (volatile Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
70
+ template <typename T>
71
+ T volatile_func3 (volatile Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
72
+ template <typename T>
73
+ T volatile_func2 (volatile Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
74
+ template <typename T>
75
+ T volatile_func1 (volatile Thing<T> *t, T a0) { return t->t | a0; }
76
+ template <typename T>
77
+ T volatile_func0 (volatile Thing<T> *t) { return t->t ; }
78
+
79
+ // const volatil bound functions
80
+ template <typename T>
81
+ T const_volatile_func5 (const volatile Thing<T> *t, T a0, T a1, T a2, T a3, T a4) { return t->t | a0 | a1 | a2 | a3 | a4; }
82
+ template <typename T>
83
+ T const_volatile_func4 (const volatile Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
84
+ template <typename T>
85
+ T const_volatile_func3 (const volatile Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
86
+ template <typename T>
87
+ T const_volatile_func2 (const volatile Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
88
+ template <typename T>
89
+ T const_volatile_func1 (const volatile Thing<T> *t, T a0) { return t->t | a0; }
90
+ template <typename T>
91
+ T const_volatile_func0 (const volatile Thing<T> *t) { return t->t ; }
92
+
51
93
52
94
// function call and result verification
53
95
template <typename T>
@@ -133,6 +175,9 @@ void test_dispatch5() {
133
175
Verifier<T>::verify5 (static_func5<T>);
134
176
Verifier<T>::verify5 (&thing, &Thing<T>::member_func5);
135
177
Verifier<T>::verify5 (&thing, &bound_func5<T>);
178
+ Verifier<T>::verify5 ((const Thing<T>*)&thing, &const_func5<T>);
179
+ Verifier<T>::verify5 ((volatile Thing<T>*)&thing, &volatile_func5<T>);
180
+ Verifier<T>::verify5 ((const volatile Thing<T>*)&thing, &const_volatile_func5<T>);
136
181
137
182
Callback<T (T,T,T,T,T)> callback (static_func5);
138
183
Verifier<T>::verify5 (callback);
@@ -147,6 +192,9 @@ void test_dispatch4() {
147
192
Verifier<T>::verify4 (static_func4<T>);
148
193
Verifier<T>::verify4 (&thing, &Thing<T>::member_func4);
149
194
Verifier<T>::verify4 (&thing, &bound_func4<T>);
195
+ Verifier<T>::verify4 ((const Thing<T>*)&thing, &const_func4<T>);
196
+ Verifier<T>::verify4 ((volatile Thing<T>*)&thing, &volatile_func4<T>);
197
+ Verifier<T>::verify4 ((const volatile Thing<T>*)&thing, &const_volatile_func4<T>);
150
198
151
199
Callback<T (T,T,T,T)> callback (static_func4);
152
200
Verifier<T>::verify4 (callback);
@@ -161,6 +209,9 @@ void test_dispatch3() {
161
209
Verifier<T>::verify3 (static_func3<T>);
162
210
Verifier<T>::verify3 (&thing, &Thing<T>::member_func3);
163
211
Verifier<T>::verify3 (&thing, &bound_func3<T>);
212
+ Verifier<T>::verify3 ((const Thing<T>*)&thing, &const_func3<T>);
213
+ Verifier<T>::verify3 ((volatile Thing<T>*)&thing, &volatile_func3<T>);
214
+ Verifier<T>::verify3 ((const volatile Thing<T>*)&thing, &const_volatile_func3<T>);
164
215
165
216
Callback<T (T,T,T)> callback (static_func3);
166
217
Verifier<T>::verify3 (callback);
@@ -175,6 +226,9 @@ void test_dispatch2() {
175
226
Verifier<T>::verify2 (static_func2<T>);
176
227
Verifier<T>::verify2 (&thing, &Thing<T>::member_func2);
177
228
Verifier<T>::verify2 (&thing, &bound_func2<T>);
229
+ Verifier<T>::verify2 ((const Thing<T>*)&thing, &const_func2<T>);
230
+ Verifier<T>::verify2 ((volatile Thing<T>*)&thing, &volatile_func2<T>);
231
+ Verifier<T>::verify2 ((const volatile Thing<T>*)&thing, &const_volatile_func2<T>);
178
232
179
233
Callback<T (T,T)> callback (static_func2);
180
234
Verifier<T>::verify2 (callback);
@@ -189,6 +243,9 @@ void test_dispatch1() {
189
243
Verifier<T>::verify1 (static_func1<T>);
190
244
Verifier<T>::verify1 (&thing, &Thing<T>::member_func1);
191
245
Verifier<T>::verify1 (&thing, &bound_func1<T>);
246
+ Verifier<T>::verify1 ((const Thing<T>*)&thing, &const_func1<T>);
247
+ Verifier<T>::verify1 ((volatile Thing<T>*)&thing, &volatile_func1<T>);
248
+ Verifier<T>::verify1 ((const volatile Thing<T>*)&thing, &const_volatile_func1<T>);
192
249
193
250
Callback<T (T)> callback (static_func1);
194
251
Verifier<T>::verify1 (callback);
@@ -203,6 +260,9 @@ void test_dispatch0() {
203
260
Verifier<T>::verify0 (static_func0<T>);
204
261
Verifier<T>::verify0 (&thing, &Thing<T>::member_func0);
205
262
Verifier<T>::verify0 (&thing, &bound_func0<T>);
263
+ Verifier<T>::verify0 ((const Thing<T>*)&thing, &const_func0<T>);
264
+ Verifier<T>::verify0 ((volatile Thing<T>*)&thing, &volatile_func0<T>);
265
+ Verifier<T>::verify0 ((const volatile Thing<T>*)&thing, &const_volatile_func0<T>);
206
266
207
267
Callback<T ()> callback (static_func0);
208
268
Verifier<T>::verify0 (callback);
0 commit comments