OpenCores
URL https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk

Subversion Repositories openrisc_2011-10-31

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc2/] [gcc/] [testsuite/] [g++.dg/] [inherit/] [using1.C] - Diff between revs 301 and 384

Only display areas with differences | Details | Blame | View Log

Rev 301 Rev 384
// Test that overloading on 'this' quals works with class using-declarations.
// Test that overloading on 'this' quals works with class using-declarations.
// { dg-do link }
// { dg-do link }
struct A {
struct A {
  void f() const;
  void f() const;
  void f() {}
  void f() {}
  void g() const {}
  void g() const {}
  void g();
  void g();
  void h() const;
  void h() const;
  void h();
  void h();
  void i() const;
  void i() const;
  void i() {}
  void i() {}
};
};
struct B: private A {
struct B: private A {
  using A::f;
  using A::f;
  using A::g;
  using A::g;
  void h () const {}
  void h () const {}
  using A::h;
  using A::h;
  void i () const {}
  void i () const {}
  using A::i;
  using A::i;
};
};
int main()
int main()
{
{
  B b1;
  B b1;
  const B b2 = B();
  const B b2 = B();
  b1.f ();
  b1.f ();
  b2.g ();
  b2.g ();
  b2.h ();
  b2.h ();
  b1.i ();
  b1.i ();
}
}
 
 

powered by: WebSVN 2.1.0

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