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
/cp
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
ptrmem9.C
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
}