projects
/
gcc.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
re PR c++/4403 (incorrect class becomes a friend in template)
[gcc.git]
/
gcc
/
testsuite
/
g++.dg
/
template
/
friend35.C
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
};