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
FSF GCC merge 02/23/03
[official-gcc.git]
/
gcc
/
testsuite
/
g++.old-deja
/
g++.pt
/
friend3.C
blob
74d0e06699c051df531d7cc298fa137a7e4dfe62
1
// Build don't link:
2
3
template <class T>
4
void f(T);
5
6
class C
7
{
8
friend void f<>(double);
9
10
int i; // ERROR - private
11
};
12
13
14
template <class T>
15
void f(T)
16
{
17
C c;
18
c.i = 3; // ERROR - f<double> is a friend, this is f<int>.
19
}
20
21
22
int main()
23
{
24
f(7);
25
}