2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / overload8.C
blob4615bd848eb5274f9d30999217bf01a2d5ed3bc7
1 // { dg-do run  }
2 class a {
3 public:
4   int f()        { return 0; }
5   int f() const  { return 1; }
6 };
8 class b : public a {
9 };
11 int main() 
13   int (b::* ptr1)()       = &b::f; 
14   int (b::* ptr2)() const = &b::f; 
15   
16   b ao;
17   
18   if ((ao.*ptr1)() != 0)
19     return 1;
20   if ((ao.*ptr2)() != 1)
21     return 1;