]>
Commit | Line | Data |
---|---|---|
138928a6 JM |
1 | template <class T> |
2 | void f(T); | |
3 | ||
4 | template <class U> | |
5 | class C | |
6 | { | |
7 | template <class T> | |
8 | friend void f(T) | |
9 | { | |
10 | C<U> c; | |
11 | c.i = 3; | |
12 | } | |
13 | ||
14 | public: | |
15 | ||
16 | void g() | |
17 | { | |
18 | f(3.0); | |
19 | } | |
20 | ||
21 | int i; | |
22 | }; | |
23 | ||
24 | int main() | |
25 | { | |
26 | f(7); | |
27 | C<double> c; | |
28 | c.g(); | |
29 | } |