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
New test case.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.ns
/
koenig3.C
1
//Check association of member pointer in overload resolution.
2
struct A {
3
int m_val;
4
friend int operator ->* (A & other, int A::*pm)
5
{ return 31; }
6
};
7
8
int A::*pi = & A::m_val;
9
10
int
11
main(void)
12
{
13
A c;
14
c.m_val = 42;
15
int j = c ->* pi;
16
17
if (j == 31)
18
return 0;
19
else
20
return 1;
21
}