FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.ns / koenig3.C
blobe039df695575b6b56d2121684092bba362eb0c35
1 //Check association of member pointer in overload resolution.
2 struct A {
3         int m_val;
4         friend int operator ->* (A & other, int A::*pm)
5                 { return 31; }
6 };
8 int A::*pi = & A::m_val;
10 int
11 main(void)
13         A c;
14         c.m_val = 42;
15         int j = c ->* pi;
17         if (j == 31)
18                 return 0;
19         else
20                 return 1;
21 }