repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
overload8.C
blob
d2c1483a9b2b0c87857e05a16a171f551ddd76b0
1
class a {
2
public:
3
int f() { return 0; }
4
int f() const { return 1; }
5
};
6
7
class b : public a {
8
};
9
10
int main()
11
{
12
int (b::* ptr1)() = &b::f;
13
int (b::* ptr2)() const = &b::f;
14
15
b ao;
16
17
if ((ao.*ptr1)() != 0)
18
return 1;
19
if ((ao.*ptr2)() != 1)
20
return 1;
21
}
22