summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/expr/ptrmem7.C
blob: a94990e54b74f9bdffb5e42ba4ebf85ad543ba81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// PR c++/22545

struct A {
  int member;
  A() : member(13) {}
};

A a;

struct B {
  operator A*() { return &a; }
};

B b;

int A::* member_pntr = &A::member;

int main()
{
  return b ->* member_pntr;
}