Sign in
gnu
/
gcc
/
14bc1c0e15633ea781d76d0ae4274b2e27d51db5
/
.
/
gcc
/
testsuite
/
g++.old-deja
/
g++.other
/
ptrmem9.C
blob: f50ba22d1083da87d84d699e006e8cd227187228 [
file
] [
log
] [
blame
]
// Test that const-correctness is observed when using pointers-to-members.
struct
A
{
int
f
()
{
return
1
;
}
int
f
()
const
{
return
0
;
}
};
struct
B
{
A a
;
B
()
{
}
};
int
main
()
{
A B
::*
bm
=
&
B
::
a
;
const
B b
;
return
(
b
.*
bm
).
f
();
}