URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
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 ();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.