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
Initial revision
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
friend13.C
blob
251d52a47bc16594d6703c231b2bebccaa30c434
1
template <class T>
2
class C;
3
4
template <class U>
5
struct S
6
{
7
template <class V>
8
void f(V v)
9
{
10
C<V> cv;
11
cv.i = 3;
12
}
13
};
14
15
16
template <class T>
17
class C
18
{
19
template <class U>
20
template <class V>
21
friend void S<U>::f(V);
22
23
int i;
24
};
25
26
27
int main()
28
{
29
S<int> si;
30
si.f(3.0);
31
S<long> sl;
32
sl.f('c');
33
}