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
2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
overload8.C
blob
4615bd848eb5274f9d30999217bf01a2d5ed3bc7
1
// { dg-do run }
2
class a {
3
public:
4
int f() { return 0; }
5
int f() const { return 1; }
6
};
7
8
class b : public a {
9
};
10
11
int main()
12
{
13
int (b::* ptr1)() = &b::f;
14
int (b::* ptr2)() const = &b::f;
15
16
b ao;
17
18
if ((ao.*ptr1)() != 0)
19
return 1;
20
if ((ao.*ptr2)() != 1)
21
return 1;
22
}
23