OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [using1.C] - Blame information for rev 779

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// Test that overloading on 'this' quals works with class using-declarations.
2
 
3
// { dg-do link }
4
 
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() {}
14
};
15
 
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;
23
};
24
 
25
int main()
26
{
27
  B b1;
28
  const B b2 = B();
29
 
30
  b1.f ();
31
  b2.g ();
32
  b2.h ();
33
  b1.i ();
34
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.