Skip to content

Commit 3bb149c

Browse files
authored
Merge pull request #2549 from geky/thread-clarification
Clean up confusion with deprecated constructors and callbacks in thread-spawning functions
2 parents b1aebba + 022f821 commit 3bb149c

File tree

4 files changed

+1424
-222
lines changed

4 files changed

+1424
-222
lines changed

TESTS/mbed_functional/callback/main.cpp

Lines changed: 226 additions & 80 deletions
Original file line numberDiff line numberDiff line change
@@ -8,108 +8,230 @@ using namespace utest::v1;
88

99
// static functions
1010
template <typename T>
11-
T static_func0() { return 0; }
11+
T static_func0()
12+
{ return 0; }
1213
template <typename T>
13-
T static_func1(T a0) { return 0 | a0; }
14+
T static_func1(T a0)
15+
{ return 0 | a0; }
1416
template <typename T>
15-
T static_func2(T a0, T a1) { return 0 | a0 | a1; }
17+
T static_func2(T a0, T a1)
18+
{ return 0 | a0 | a1; }
1619
template <typename T>
17-
T static_func3(T a0, T a1, T a2) { return 0 | a0 | a1 | a2; }
20+
T static_func3(T a0, T a1, T a2)
21+
{ return 0 | a0 | a1 | a2; }
1822
template <typename T>
19-
T static_func4(T a0, T a1, T a2, T a3) { return 0 | a0 | a1 | a2 | a3; }
23+
T static_func4(T a0, T a1, T a2, T a3)
24+
{ return 0 | a0 | a1 | a2 | a3; }
2025
template <typename T>
21-
T static_func5(T a0, T a1, T a2, T a3, T a4) { return 0 | a0 | a1 | a2 | a3 | a4; }
26+
T static_func5(T a0, T a1, T a2, T a3, T a4)
27+
{ return 0 | a0 | a1 | a2 | a3 | a4; }
2228

2329
// class functions
2430
template <typename T>
2531
struct Thing {
2632
T t;
2733
Thing() : t(0x80) {}
2834

29-
T member_func0() { return t; }
30-
T member_func1(T a0) { return t | a0; }
31-
T member_func2(T a0, T a1) { return t | a0 | a1; }
32-
T member_func3(T a0, T a1, T a2) { return t | a0 | a1 | a2; }
33-
T member_func4(T a0, T a1, T a2, T a3) { return t | a0 | a1 | a2 | a3; }
34-
T member_func5(T a0, T a1, T a2, T a3, T a4) { return t | a0 | a1 | a2 | a3 | a4; }
35-
36-
T const_member_func0() const { return t; }
37-
T const_member_func1(T a0) const { return t | a0; }
38-
T const_member_func2(T a0, T a1) const { return t | a0 | a1; }
39-
T const_member_func3(T a0, T a1, T a2) const { return t | a0 | a1 | a2; }
40-
T const_member_func4(T a0, T a1, T a2, T a3) const { return t | a0 | a1 | a2 | a3; }
41-
T const_member_func5(T a0, T a1, T a2, T a3, T a4) const { return t | a0 | a1 | a2 | a3 | a4; }
42-
43-
T volatile_member_func0() volatile { return t; }
44-
T volatile_member_func1(T a0) volatile { return t | a0; }
45-
T volatile_member_func2(T a0, T a1) volatile { return t | a0 | a1; }
46-
T volatile_member_func3(T a0, T a1, T a2) volatile { return t | a0 | a1 | a2; }
47-
T volatile_member_func4(T a0, T a1, T a2, T a3) volatile { return t | a0 | a1 | a2 | a3; }
48-
T volatile_member_func5(T a0, T a1, T a2, T a3, T a4) volatile { return t | a0 | a1 | a2 | a3 | a4; }
49-
50-
T const_volatile_member_func0() const volatile { return t; }
51-
T const_volatile_member_func1(T a0) const volatile { return t | a0; }
52-
T const_volatile_member_func2(T a0, T a1) const volatile { return t | a0 | a1; }
53-
T const_volatile_member_func3(T a0, T a1, T a2) const volatile { return t | a0 | a1 | a2; }
54-
T const_volatile_member_func4(T a0, T a1, T a2, T a3) const volatile { return t | a0 | a1 | a2 | a3; }
55-
T const_volatile_member_func5(T a0, T a1, T a2, T a3, T a4) const volatile { return t | a0 | a1 | a2 | a3 | a4; }
35+
T member_func0()
36+
{ return t; }
37+
T member_func1(T a0)
38+
{ return t | a0; }
39+
T member_func2(T a0, T a1)
40+
{ return t | a0 | a1; }
41+
T member_func3(T a0, T a1, T a2)
42+
{ return t | a0 | a1 | a2; }
43+
T member_func4(T a0, T a1, T a2, T a3)
44+
{ return t | a0 | a1 | a2 | a3; }
45+
T member_func5(T a0, T a1, T a2, T a3, T a4)
46+
{ return t | a0 | a1 | a2 | a3 | a4; }
47+
48+
T const_member_func0() const
49+
{ return t; }
50+
T const_member_func1(T a0) const
51+
{ return t | a0; }
52+
T const_member_func2(T a0, T a1) const
53+
{ return t | a0 | a1; }
54+
T const_member_func3(T a0, T a1, T a2) const
55+
{ return t | a0 | a1 | a2; }
56+
T const_member_func4(T a0, T a1, T a2, T a3) const
57+
{ return t | a0 | a1 | a2 | a3; }
58+
T const_member_func5(T a0, T a1, T a2, T a3, T a4) const
59+
{ return t | a0 | a1 | a2 | a3 | a4; }
60+
61+
T volatile_member_func0() volatile
62+
{ return t; }
63+
T volatile_member_func1(T a0) volatile
64+
{ return t | a0; }
65+
T volatile_member_func2(T a0, T a1) volatile
66+
{ return t | a0 | a1; }
67+
T volatile_member_func3(T a0, T a1, T a2) volatile
68+
{ return t | a0 | a1 | a2; }
69+
T volatile_member_func4(T a0, T a1, T a2, T a3) volatile
70+
{ return t | a0 | a1 | a2 | a3; }
71+
T volatile_member_func5(T a0, T a1, T a2, T a3, T a4) volatile
72+
{ return t | a0 | a1 | a2 | a3 | a4; }
73+
74+
T const_volatile_member_func0() const volatile
75+
{ return t; }
76+
T const_volatile_member_func1(T a0) const volatile
77+
{ return t | a0; }
78+
T const_volatile_member_func2(T a0, T a1) const volatile
79+
{ return t | a0 | a1; }
80+
T const_volatile_member_func3(T a0, T a1, T a2) const volatile
81+
{ return t | a0 | a1 | a2; }
82+
T const_volatile_member_func4(T a0, T a1, T a2, T a3) const volatile
83+
{ return t | a0 | a1 | a2 | a3; }
84+
T const_volatile_member_func5(T a0, T a1, T a2, T a3, T a4) const volatile
85+
{ return t | a0 | a1 | a2 | a3 | a4; }
5686
};
5787

5888
// bound functions
5989
template <typename T>
60-
T bound_func0(Thing<T> *t) { return t->t; }
90+
T bound_func0(Thing<T> *t)
91+
{ return t->t; }
6192
template <typename T>
62-
T bound_func1(Thing<T> *t, T a0) { return t->t | a0; }
93+
T bound_func1(Thing<T> *t, T a0)
94+
{ return t->t | a0; }
6395
template <typename T>
64-
T bound_func2(Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
96+
T bound_func2(Thing<T> *t, T a0, T a1)
97+
{ return t->t | a0 | a1; }
6598
template <typename T>
66-
T bound_func3(Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
99+
T bound_func3(Thing<T> *t, T a0, T a1, T a2)
100+
{ return t->t | a0 | a1 | a2; }
67101
template <typename T>
68-
T bound_func4(Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
102+
T bound_func4(Thing<T> *t, T a0, T a1, T a2, T a3)
103+
{ return t->t | a0 | a1 | a2 | a3; }
69104
template <typename T>
70-
T bound_func5(Thing<T> *t, T a0, T a1, T a2, T a3, T a4) { return t->t | a0 | a1 | a2 | a3 | a4; }
71-
72-
// const bound functions
105+
T bound_func5(Thing<T> *t, T a0, T a1, T a2, T a3, T a4)
106+
{ return t->t | a0 | a1 | a2 | a3 | a4; }
73107
template <typename T>
74-
T const_func0(const Thing<T> *t) { return t->t; }
108+
T const_bound_func0(const Thing<T> *t)
109+
{ return t->t; }
75110
template <typename T>
76-
T const_func1(const Thing<T> *t, T a0) { return t->t | a0; }
111+
T const_bound_func1(const Thing<T> *t, T a0)
112+
{ return t->t | a0; }
77113
template <typename T>
78-
T const_func2(const Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
114+
T const_bound_func2(const Thing<T> *t, T a0, T a1)
115+
{ return t->t | a0 | a1; }
79116
template <typename T>
80-
T const_func3(const Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
117+
T const_bound_func3(const Thing<T> *t, T a0, T a1, T a2)
118+
{ return t->t | a0 | a1 | a2; }
81119
template <typename T>
82-
T const_func4(const Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
120+
T const_bound_func4(const Thing<T> *t, T a0, T a1, T a2, T a3)
121+
{ return t->t | a0 | a1 | a2 | a3; }
83122
template <typename T>
84-
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; }
85-
86-
// volatile bound functions
123+
T const_bound_func5(const Thing<T> *t, T a0, T a1, T a2, T a3, T a4)
124+
{ return t->t | a0 | a1 | a2 | a3 | a4; }
125+
template <typename T>
126+
T volatile_bound_func0(volatile Thing<T> *t)
127+
{ return t->t; }
128+
template <typename T>
129+
T volatile_bound_func1(volatile Thing<T> *t, T a0)
130+
{ return t->t | a0; }
131+
template <typename T>
132+
T volatile_bound_func2(volatile Thing<T> *t, T a0, T a1)
133+
{ return t->t | a0 | a1; }
134+
template <typename T>
135+
T volatile_bound_func3(volatile Thing<T> *t, T a0, T a1, T a2)
136+
{ return t->t | a0 | a1 | a2; }
137+
template <typename T>
138+
T volatile_bound_func4(volatile Thing<T> *t, T a0, T a1, T a2, T a3)
139+
{ return t->t | a0 | a1 | a2 | a3; }
87140
template <typename T>
88-
T volatile_func0(volatile Thing<T> *t) { return t->t; }
141+
T volatile_bound_func5(volatile Thing<T> *t, T a0, T a1, T a2, T a3, T a4)
142+
{ return t->t | a0 | a1 | a2 | a3 | a4; }
89143
template <typename T>
90-
T volatile_func1(volatile Thing<T> *t, T a0) { return t->t | a0; }
144+
T const_volatile_bound_func0(const volatile Thing<T> *t)
145+
{ return t->t; }
91146
template <typename T>
92-
T volatile_func2(volatile Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
147+
T const_volatile_bound_func1(const volatile Thing<T> *t, T a0)
148+
{ return t->t | a0; }
93149
template <typename T>
94-
T volatile_func3(volatile Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
150+
T const_volatile_bound_func2(const volatile Thing<T> *t, T a0, T a1)
151+
{ return t->t | a0 | a1; }
95152
template <typename T>
96-
T volatile_func4(volatile Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
153+
T const_volatile_bound_func3(const volatile Thing<T> *t, T a0, T a1, T a2)
154+
{ return t->t | a0 | a1 | a2; }
97155
template <typename T>
98-
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; }
156+
T const_volatile_bound_func4(const volatile Thing<T> *t, T a0, T a1, T a2, T a3)
157+
{ return t->t | a0 | a1 | a2 | a3; }
158+
template <typename T>
159+
T const_volatile_bound_func5(const volatile Thing<T> *t, T a0, T a1, T a2, T a3, T a4)
160+
{ return t->t | a0 | a1 | a2 | a3 | a4; }
99161

100-
// const volatile bound functions
162+
// void functions
163+
template <typename T>
164+
T void_func0(void *t)
165+
{ return static_cast<Thing<T>*>(t)->t; }
166+
template <typename T>
167+
T void_func1(void *t, T a0)
168+
{ return static_cast<Thing<T>*>(t)->t | a0; }
169+
template <typename T>
170+
T void_func2(void *t, T a0, T a1)
171+
{ return static_cast<Thing<T>*>(t)->t | a0 | a1; }
172+
template <typename T>
173+
T void_func3(void *t, T a0, T a1, T a2)
174+
{ return static_cast<Thing<T>*>(t)->t | a0 | a1 | a2; }
175+
template <typename T>
176+
T void_func4(void *t, T a0, T a1, T a2, T a3)
177+
{ return static_cast<Thing<T>*>(t)->t | a0 | a1 | a2 | a3; }
178+
template <typename T>
179+
T void_func5(void *t, T a0, T a1, T a2, T a3, T a4)
180+
{ return static_cast<Thing<T>*>(t)->t | a0 | a1 | a2 | a3 | a4; }
181+
template <typename T>
182+
T const_void_func0(const void *t)
183+
{ return static_cast<const Thing<T>*>(t)->t; }
184+
template <typename T>
185+
T const_void_func1(const void *t, T a0)
186+
{ return static_cast<const Thing<T>*>(t)->t | a0; }
187+
template <typename T>
188+
T const_void_func2(const void *t, T a0, T a1)
189+
{ return static_cast<const Thing<T>*>(t)->t | a0 | a1; }
190+
template <typename T>
191+
T const_void_func3(const void *t, T a0, T a1, T a2)
192+
{ return static_cast<const Thing<T>*>(t)->t | a0 | a1 | a2; }
193+
template <typename T>
194+
T const_void_func4(const void *t, T a0, T a1, T a2, T a3)
195+
{ return static_cast<const Thing<T>*>(t)->t | a0 | a1 | a2 | a3; }
196+
template <typename T>
197+
T const_void_func5(const void *t, T a0, T a1, T a2, T a3, T a4)
198+
{ return static_cast<const Thing<T>*>(t)->t | a0 | a1 | a2 | a3 | a4; }
199+
template <typename T>
200+
T volatile_void_func0(volatile void *t)
201+
{ return static_cast<volatile Thing<T>*>(t)->t; }
202+
template <typename T>
203+
T volatile_void_func1(volatile void *t, T a0)
204+
{ return static_cast<volatile Thing<T>*>(t)->t | a0; }
205+
template <typename T>
206+
T volatile_void_func2(volatile void *t, T a0, T a1)
207+
{ return static_cast<volatile Thing<T>*>(t)->t | a0 | a1; }
208+
template <typename T>
209+
T volatile_void_func3(volatile void *t, T a0, T a1, T a2)
210+
{ return static_cast<volatile Thing<T>*>(t)->t | a0 | a1 | a2; }
211+
template <typename T>
212+
T volatile_void_func4(volatile void *t, T a0, T a1, T a2, T a3)
213+
{ return static_cast<volatile Thing<T>*>(t)->t | a0 | a1 | a2 | a3; }
214+
template <typename T>
215+
T volatile_void_func5(volatile void *t, T a0, T a1, T a2, T a3, T a4)
216+
{ return static_cast<volatile Thing<T>*>(t)->t | a0 | a1 | a2 | a3 | a4; }
101217
template <typename T>
102-
T const_volatile_func0(const volatile Thing<T> *t) { return t->t; }
218+
T const_volatile_void_func0(const volatile void *t)
219+
{ return static_cast<const volatile Thing<T>*>(t)->t; }
103220
template <typename T>
104-
T const_volatile_func1(const volatile Thing<T> *t, T a0) { return t->t | a0; }
221+
T const_volatile_void_func1(const volatile void *t, T a0)
222+
{ return static_cast<const volatile Thing<T>*>(t)->t | a0; }
105223
template <typename T>
106-
T const_volatile_func2(const volatile Thing<T> *t, T a0, T a1) { return t->t | a0 | a1; }
224+
T const_volatile_void_func2(const volatile void *t, T a0, T a1)
225+
{ return static_cast<const volatile Thing<T>*>(t)->t | a0 | a1; }
107226
template <typename T>
108-
T const_volatile_func3(const volatile Thing<T> *t, T a0, T a1, T a2) { return t->t | a0 | a1 | a2; }
227+
T const_volatile_void_func3(const volatile void *t, T a0, T a1, T a2)
228+
{ return static_cast<const volatile Thing<T>*>(t)->t | a0 | a1 | a2; }
109229
template <typename T>
110-
T const_volatile_func4(const volatile Thing<T> *t, T a0, T a1, T a2, T a3) { return t->t | a0 | a1 | a2 | a3; }
230+
T const_volatile_void_func4(const volatile void *t, T a0, T a1, T a2, T a3)
231+
{ return static_cast<const volatile Thing<T>*>(t)->t | a0 | a1 | a2 | a3; }
111232
template <typename T>
112-
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; }
233+
T const_volatile_void_func5(const volatile void *t, T a0, T a1, T a2, T a3, T a4)
234+
{ return static_cast<const volatile Thing<T>*>(t)->t | a0 | a1 | a2 | a3 | a4; }
113235

114236

115237
// function call and result verification
@@ -199,9 +321,13 @@ void test_dispatch0() {
199321
Verifier<T>::verify0((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func0);
200322
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func0);
201323
Verifier<T>::verify0(&thing, &bound_func0<T>);
202-
Verifier<T>::verify0((const Thing<T>*)&thing, &const_func0<T>);
203-
Verifier<T>::verify0((volatile Thing<T>*)&thing, &volatile_func0<T>);
204-
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &const_volatile_func0<T>);
324+
Verifier<T>::verify0((const Thing<T>*)&thing, &const_bound_func0<T>);
325+
Verifier<T>::verify0((volatile Thing<T>*)&thing, &volatile_bound_func0<T>);
326+
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &const_volatile_bound_func0<T>);
327+
Verifier<T>::verify0(&thing, &void_func0<T>);
328+
Verifier<T>::verify0((const Thing<T>*)&thing, &const_void_func0<T>);
329+
Verifier<T>::verify0((volatile Thing<T>*)&thing, &volatile_void_func0<T>);
330+
Verifier<T>::verify0((const volatile Thing<T>*)&thing, &const_volatile_void_func0<T>);
205331
Verifier<T>::verify0(callback(static_func0<T>));
206332

207333
Callback<T()> cb(static_func0);
@@ -222,9 +348,13 @@ void test_dispatch1() {
222348
Verifier<T>::verify1((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func1);
223349
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func1);
224350
Verifier<T>::verify1(&thing, &bound_func1<T>);
225-
Verifier<T>::verify1((const Thing<T>*)&thing, &const_func1<T>);
226-
Verifier<T>::verify1((volatile Thing<T>*)&thing, &volatile_func1<T>);
227-
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &const_volatile_func1<T>);
351+
Verifier<T>::verify1((const Thing<T>*)&thing, &const_bound_func1<T>);
352+
Verifier<T>::verify1((volatile Thing<T>*)&thing, &volatile_bound_func1<T>);
353+
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &const_volatile_bound_func1<T>);
354+
Verifier<T>::verify1(&thing, &void_func1<T>);
355+
Verifier<T>::verify1((const Thing<T>*)&thing, &const_void_func1<T>);
356+
Verifier<T>::verify1((volatile Thing<T>*)&thing, &volatile_void_func1<T>);
357+
Verifier<T>::verify1((const volatile Thing<T>*)&thing, &const_volatile_void_func1<T>);
228358
Verifier<T>::verify1(callback(static_func1<T>));
229359

230360
Callback<T(T)> cb(static_func1);
@@ -245,9 +375,13 @@ void test_dispatch2() {
245375
Verifier<T>::verify2((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func2);
246376
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func2);
247377
Verifier<T>::verify2(&thing, &bound_func2<T>);
248-
Verifier<T>::verify2((const Thing<T>*)&thing, &const_func2<T>);
249-
Verifier<T>::verify2((volatile Thing<T>*)&thing, &volatile_func2<T>);
250-
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &const_volatile_func2<T>);
378+
Verifier<T>::verify2((const Thing<T>*)&thing, &const_bound_func2<T>);
379+
Verifier<T>::verify2((volatile Thing<T>*)&thing, &volatile_bound_func2<T>);
380+
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &const_volatile_bound_func2<T>);
381+
Verifier<T>::verify2(&thing, &void_func2<T>);
382+
Verifier<T>::verify2((const Thing<T>*)&thing, &const_void_func2<T>);
383+
Verifier<T>::verify2((volatile Thing<T>*)&thing, &volatile_void_func2<T>);
384+
Verifier<T>::verify2((const volatile Thing<T>*)&thing, &const_volatile_void_func2<T>);
251385
Verifier<T>::verify2(callback(static_func2<T>));
252386

253387
Callback<T(T, T)> cb(static_func2);
@@ -268,9 +402,13 @@ void test_dispatch3() {
268402
Verifier<T>::verify3((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func3);
269403
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func3);
270404
Verifier<T>::verify3(&thing, &bound_func3<T>);
271-
Verifier<T>::verify3((const Thing<T>*)&thing, &const_func3<T>);
272-
Verifier<T>::verify3((volatile Thing<T>*)&thing, &volatile_func3<T>);
273-
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &const_volatile_func3<T>);
405+
Verifier<T>::verify3((const Thing<T>*)&thing, &const_bound_func3<T>);
406+
Verifier<T>::verify3((volatile Thing<T>*)&thing, &volatile_bound_func3<T>);
407+
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &const_volatile_bound_func3<T>);
408+
Verifier<T>::verify3(&thing, &void_func3<T>);
409+
Verifier<T>::verify3((const Thing<T>*)&thing, &const_void_func3<T>);
410+
Verifier<T>::verify3((volatile Thing<T>*)&thing, &volatile_void_func3<T>);
411+
Verifier<T>::verify3((const volatile Thing<T>*)&thing, &const_volatile_void_func3<T>);
274412
Verifier<T>::verify3(callback(static_func3<T>));
275413

276414
Callback<T(T, T, T)> cb(static_func3);
@@ -291,9 +429,13 @@ void test_dispatch4() {
291429
Verifier<T>::verify4((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func4);
292430
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func4);
293431
Verifier<T>::verify4(&thing, &bound_func4<T>);
294-
Verifier<T>::verify4((const Thing<T>*)&thing, &const_func4<T>);
295-
Verifier<T>::verify4((volatile Thing<T>*)&thing, &volatile_func4<T>);
296-
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &const_volatile_func4<T>);
432+
Verifier<T>::verify4((const Thing<T>*)&thing, &const_bound_func4<T>);
433+
Verifier<T>::verify4((volatile Thing<T>*)&thing, &volatile_bound_func4<T>);
434+
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &const_volatile_bound_func4<T>);
435+
Verifier<T>::verify4(&thing, &void_func4<T>);
436+
Verifier<T>::verify4((const Thing<T>*)&thing, &const_void_func4<T>);
437+
Verifier<T>::verify4((volatile Thing<T>*)&thing, &volatile_void_func4<T>);
438+
Verifier<T>::verify4((const volatile Thing<T>*)&thing, &const_volatile_void_func4<T>);
297439
Verifier<T>::verify4(callback(static_func4<T>));
298440

299441
Callback<T(T, T, T, T)> cb(static_func4);
@@ -314,9 +456,13 @@ void test_dispatch5() {
314456
Verifier<T>::verify5((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func5);
315457
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func5);
316458
Verifier<T>::verify5(&thing, &bound_func5<T>);
317-
Verifier<T>::verify5((const Thing<T>*)&thing, &const_func5<T>);
318-
Verifier<T>::verify5((volatile Thing<T>*)&thing, &volatile_func5<T>);
319-
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &const_volatile_func5<T>);
459+
Verifier<T>::verify5((const Thing<T>*)&thing, &const_bound_func5<T>);
460+
Verifier<T>::verify5((volatile Thing<T>*)&thing, &volatile_bound_func5<T>);
461+
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &const_volatile_bound_func5<T>);
462+
Verifier<T>::verify5(&thing, &void_func5<T>);
463+
Verifier<T>::verify5((const Thing<T>*)&thing, &const_void_func5<T>);
464+
Verifier<T>::verify5((volatile Thing<T>*)&thing, &volatile_void_func5<T>);
465+
Verifier<T>::verify5((const volatile Thing<T>*)&thing, &const_volatile_void_func5<T>);
320466
Verifier<T>::verify5(callback(static_func5<T>));
321467

322468
Callback<T(T, T, T, T, T)> cb(static_func5);

0 commit comments

Comments
 (0)