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
/
ptrmem9.C
blob
67d4f280eedeaa67d9700cef428f6a56e6720821
1
// { dg-do run }
2
// Test that const-correctness is observed when using pointers-to-members.
3
4
struct A {
5
int f () { return 1; }
6
int f () const { return 0; }
7
};
8
9
struct B {
10
A a;
11
B() { }
12
};
13
14
int main ()
15
{
16
A B::*bm = &B::a;
17
const B b;
18
return (b.*bm).f ();
19
}