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
* c-common.c (get_priority): Add check for
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
friend12.C
blob
0c4275151a67bda8e0c825b784b2e16adc3da922
1
// { dg-do run }
2
template <class T>
3
class C;
4
5
template <class T>
6
struct S
7
{
8
template <class U>
9
void f(U u1, U u2) {}
10
11
template <class U>
12
void f(U u)
13
{
14
C<T> ct;
15
ct.i = 3;
16
}
17
};
18
19
20
template <class T>
21
class C
22
{
23
template <class U>
24
friend void S<T>::f(U);
25
26
int i;
27
};
28
29
30
int main()
31
{
32
S<int> si;
33
si.f(3.0);
34
}