repo.or.cz
/
netbsd-mini2440.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Sync usage with man page.
[netbsd-mini2440.git]
/
gnu
/
dist
/
gcc4
/
gcc
/
testsuite
/
g++.dg
/
template
/
friend35.C
blob
b150ccdab8941987753e9c4cd82b4fca029a185e
1
// { dg-do compile }
2
3
// Origin: Giovanni Bajo <giovannibajo@libero.it>
4
5
// PR c++/4403: Incorrect friend class chosen during instantiation.
6
7
template <typename T>
8
struct A
9
{
10
struct F;
11
};
12
13
template <typename T>
14
struct B : A<T>
15
{
16
friend struct F;
17
private:
18
int priv;
19
};
20
21
struct F
22
{
23
void func(void)
24
{
25
B<int> b;
26
b.priv = 0;
27
}
28
};