@@ -233,6 +233,11 @@ template <typename T>
233
233
T const_volatile_void_func5 (const volatile void *t, T a0, T a1, T a2, T a3, T a4)
234
234
{ return static_cast <const volatile Thing<T>*>(t)->t | a0 | a1 | a2 | a3 | a4; }
235
235
236
+ // Inheriting class
237
+ template <typename T>
238
+ class Thing2 : public Thing <T> {
239
+ };
240
+
236
241
237
242
// function call and result verification
238
243
template <typename T>
@@ -315,15 +320,18 @@ struct Verifier {
315
320
template <typename T>
316
321
void test_dispatch0 () {
317
322
Thing<T> thing;
323
+ Thing2<T> thing2;
318
324
Verifier<T>::verify0 (static_func0<T>);
319
325
Verifier<T>::verify0 (&thing, &Thing<T>::member_func0);
320
326
Verifier<T>::verify0 ((const Thing<T>*)&thing, &Thing<T>::const_member_func0);
321
327
Verifier<T>::verify0 ((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func0);
322
328
Verifier<T>::verify0 ((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func0);
329
+ Verifier<T>::verify0 (&thing2, &Thing2<T>::member_func0);
323
330
Verifier<T>::verify0 (&bound_func0<T>, &thing);
324
331
Verifier<T>::verify0 (&const_bound_func0<T>, (const Thing<T>*)&thing);
325
332
Verifier<T>::verify0 (&volatile_bound_func0<T>, (volatile Thing<T>*)&thing);
326
333
Verifier<T>::verify0 (&const_volatile_bound_func0<T>, (const volatile Thing<T>*)&thing);
334
+ Verifier<T>::verify0 (&bound_func0<T>, &thing2);
327
335
Verifier<T>::verify0 (&void_func0<T>, &thing);
328
336
Verifier<T>::verify0 (&const_void_func0<T>, (const Thing<T>*)&thing);
329
337
Verifier<T>::verify0 (&volatile_void_func0<T>, (volatile Thing<T>*)&thing);
@@ -342,15 +350,18 @@ void test_dispatch0() {
342
350
template <typename T>
343
351
void test_dispatch1 () {
344
352
Thing<T> thing;
353
+ Thing2<T> thing2;
345
354
Verifier<T>::verify1 (static_func1<T>);
346
355
Verifier<T>::verify1 (&thing, &Thing<T>::member_func1);
347
356
Verifier<T>::verify1 ((const Thing<T>*)&thing, &Thing<T>::const_member_func1);
348
357
Verifier<T>::verify1 ((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func1);
349
358
Verifier<T>::verify1 ((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func1);
359
+ Verifier<T>::verify1 (&thing2, &Thing2<T>::member_func1);
350
360
Verifier<T>::verify1 (&bound_func1<T>, &thing);
351
361
Verifier<T>::verify1 (&const_bound_func1<T>, (const Thing<T>*)&thing);
352
362
Verifier<T>::verify1 (&volatile_bound_func1<T>, (volatile Thing<T>*)&thing);
353
363
Verifier<T>::verify1 (&const_volatile_bound_func1<T>, (const volatile Thing<T>*)&thing);
364
+ Verifier<T>::verify1 (&bound_func1<T>, &thing2);
354
365
Verifier<T>::verify1 (&void_func1<T>, &thing);
355
366
Verifier<T>::verify1 (&const_void_func1<T>, (const Thing<T>*)&thing);
356
367
Verifier<T>::verify1 (&volatile_void_func1<T>, (volatile Thing<T>*)&thing);
@@ -369,15 +380,18 @@ void test_dispatch1() {
369
380
template <typename T>
370
381
void test_dispatch2 () {
371
382
Thing<T> thing;
383
+ Thing2<T> thing2;
372
384
Verifier<T>::verify2 (static_func2<T>);
373
385
Verifier<T>::verify2 (&thing, &Thing<T>::member_func2);
374
386
Verifier<T>::verify2 ((const Thing<T>*)&thing, &Thing<T>::const_member_func2);
375
387
Verifier<T>::verify2 ((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func2);
376
388
Verifier<T>::verify2 ((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func2);
389
+ Verifier<T>::verify2 (&thing2, &Thing2<T>::member_func2);
377
390
Verifier<T>::verify2 (&bound_func2<T>, &thing);
378
391
Verifier<T>::verify2 (&const_bound_func2<T>, (const Thing<T>*)&thing);
379
392
Verifier<T>::verify2 (&volatile_bound_func2<T>, (volatile Thing<T>*)&thing);
380
393
Verifier<T>::verify2 (&const_volatile_bound_func2<T>, (const volatile Thing<T>*)&thing);
394
+ Verifier<T>::verify2 (&bound_func2<T>, &thing2);
381
395
Verifier<T>::verify2 (&void_func2<T>, &thing);
382
396
Verifier<T>::verify2 (&const_void_func2<T>, (const Thing<T>*)&thing);
383
397
Verifier<T>::verify2 (&volatile_void_func2<T>, (volatile Thing<T>*)&thing);
@@ -396,15 +410,18 @@ void test_dispatch2() {
396
410
template <typename T>
397
411
void test_dispatch3 () {
398
412
Thing<T> thing;
413
+ Thing2<T> thing2;
399
414
Verifier<T>::verify3 (static_func3<T>);
400
415
Verifier<T>::verify3 (&thing, &Thing<T>::member_func3);
401
416
Verifier<T>::verify3 ((const Thing<T>*)&thing, &Thing<T>::const_member_func3);
402
417
Verifier<T>::verify3 ((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func3);
403
418
Verifier<T>::verify3 ((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func3);
419
+ Verifier<T>::verify3 (&thing2, &Thing2<T>::member_func3);
404
420
Verifier<T>::verify3 (&bound_func3<T>, &thing);
405
421
Verifier<T>::verify3 (&const_bound_func3<T>, (const Thing<T>*)&thing);
406
422
Verifier<T>::verify3 (&volatile_bound_func3<T>, (volatile Thing<T>*)&thing);
407
423
Verifier<T>::verify3 (&const_volatile_bound_func3<T>, (const volatile Thing<T>*)&thing);
424
+ Verifier<T>::verify3 (&bound_func3<T>, &thing2);
408
425
Verifier<T>::verify3 (&void_func3<T>, &thing);
409
426
Verifier<T>::verify3 (&const_void_func3<T>, (const Thing<T>*)&thing);
410
427
Verifier<T>::verify3 (&volatile_void_func3<T>, (volatile Thing<T>*)&thing);
@@ -423,15 +440,18 @@ void test_dispatch3() {
423
440
template <typename T>
424
441
void test_dispatch4 () {
425
442
Thing<T> thing;
443
+ Thing2<T> thing2;
426
444
Verifier<T>::verify4 (static_func4<T>);
427
445
Verifier<T>::verify4 (&thing, &Thing<T>::member_func4);
428
446
Verifier<T>::verify4 ((const Thing<T>*)&thing, &Thing<T>::const_member_func4);
429
447
Verifier<T>::verify4 ((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func4);
430
448
Verifier<T>::verify4 ((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func4);
449
+ Verifier<T>::verify4 (&thing2, &Thing2<T>::member_func4);
431
450
Verifier<T>::verify4 (&bound_func4<T>, &thing);
432
451
Verifier<T>::verify4 (&const_bound_func4<T>, (const Thing<T>*)&thing);
433
452
Verifier<T>::verify4 (&volatile_bound_func4<T>, (volatile Thing<T>*)&thing);
434
453
Verifier<T>::verify4 (&const_volatile_bound_func4<T>, (const volatile Thing<T>*)&thing);
454
+ Verifier<T>::verify4 (&bound_func4<T>, &thing2);
435
455
Verifier<T>::verify4 (&void_func4<T>, &thing);
436
456
Verifier<T>::verify4 (&const_void_func4<T>, (const Thing<T>*)&thing);
437
457
Verifier<T>::verify4 (&volatile_void_func4<T>, (volatile Thing<T>*)&thing);
@@ -450,15 +470,18 @@ void test_dispatch4() {
450
470
template <typename T>
451
471
void test_dispatch5 () {
452
472
Thing<T> thing;
473
+ Thing2<T> thing2;
453
474
Verifier<T>::verify5 (static_func5<T>);
454
475
Verifier<T>::verify5 (&thing, &Thing<T>::member_func5);
455
476
Verifier<T>::verify5 ((const Thing<T>*)&thing, &Thing<T>::const_member_func5);
456
477
Verifier<T>::verify5 ((volatile Thing<T>*)&thing, &Thing<T>::volatile_member_func5);
457
478
Verifier<T>::verify5 ((const volatile Thing<T>*)&thing, &Thing<T>::const_volatile_member_func5);
479
+ Verifier<T>::verify5 (&thing2, &Thing2<T>::member_func5);
458
480
Verifier<T>::verify5 (&bound_func5<T>, &thing);
459
481
Verifier<T>::verify5 (&const_bound_func5<T>, (const Thing<T>*)&thing);
460
482
Verifier<T>::verify5 (&volatile_bound_func5<T>, (volatile Thing<T>*)&thing);
461
483
Verifier<T>::verify5 (&const_volatile_bound_func5<T>, (const volatile Thing<T>*)&thing);
484
+ Verifier<T>::verify5 (&bound_func5<T>, &thing2);
462
485
Verifier<T>::verify5 (&void_func5<T>, &thing);
463
486
Verifier<T>::verify5 (&const_void_func5<T>, (const Thing<T>*)&thing);
464
487
Verifier<T>::verify5 (&volatile_void_func5<T>, (volatile Thing<T>*)&thing);
0 commit comments