2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / ptrmem9.C
blob67d4f280eedeaa67d9700cef428f6a56e6720821
1 // { dg-do run  }
2 // Test that const-correctness is observed when using pointers-to-members.
4 struct A {
5   int f () { return 1; }
6   int f () const { return 0; }
7 };
9 struct B {
10   A a;
11   B() { }
14 int main ()
16   A B::*bm = &B::a;
17   const B b;
18   return (b.*bm).f ();