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
* pt.c (instantiate_class_template_1): If DECL_PRESERVE_P is set
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
g++.dg
/
lookup
/
friend5.C
1
// { dg-do compile }
2
3
// Origin: aroach@stoic.electriceyeball.com
4
5
// PR c++/3332: Friend function lookup in class defined outside its
6
// namespace
7
8
namespace N
9
{
10
class A;
11
}
12
13
class N::A
14
{
15
void x();
16
friend void func(void);
17
};
18
19
namespace N
20
{
21
void func(void);
22
}
23
24
void N::func(void)
25
{
26
N::A a;
27
a.x();
28
}
29
30
int main()
31
{
32
return 0;
33
}
34