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
cp/
[official-gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
lookup
/
friend19.C
blob
346204b0114bef194a84d1010b4ac543d85963c1
1
// Make sure unhiding friends doesn't unhide similarly named friends
2
3
struct X
4
{
5
friend int foo (X);
6
};
7
8
struct Y
9
{
10
friend int foo (Y);
11
};
12
13
void Baz ()
14
{
15
foo (X());
16
foo (Y());
17
}
18
19
int foo (Y);
20
int foo (int);
21
// foo(X) still hidden
22
23
void Bar ()
24
{
25
foo (X());
26
foo (Y());
27
::foo (X()); // { dg-error "" }
28
::foo (Y());
29
}