FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.dg / inherit / using1.C
blob03c9144e5d6c85e7a3f2c5cd72cb28a834803e2d
1 // Test that overloading on 'this' quals works with class using-declarations.
3 // { dg-do link }
5 struct A {
6   void f() const;
7   void f() {}
8   void g() const {}
9   void g();
10   void h() const;
11   void h();
12   void i() const;
13   void i() {}
16 struct B: private A {
17   using A::f;
18   using A::g;
19   void h () const {}
20   using A::h;
21   void i () const {}
22   using A::i;
25 int main()
27   B b1;
28   const B b2 = B();
30   b1.f ();
31   b2.g ();
32   b2.h ();
33   b1.i ();