1 | // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c++11 |
---|---|
2 | // expected-no-diagnostics |
3 | |
4 | struct A {}; |
5 | |
6 | struct B { |
7 | operator A*(); |
8 | }; |
9 | |
10 | struct C : B { |
11 | |
12 | }; |
13 | |
14 | |
15 | void foo(C c, B b, int A::* pmf) { |
16 | int j = c->*pmf; |
17 | int i = b->*pmf; |
18 | } |
19 | |
20 | struct D { |
21 | operator const D *(); |
22 | }; |
23 | |
24 | struct DPtr { |
25 | operator volatile int D::*(); |
26 | }; |
27 | |
28 | int test(D d, DPtr dptr) { |
29 | return d->*dptr; |
30 | } |
31 | |
32 |