OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
PR c++/10549
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
inherit
/
using1.C
1
// 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
}