URL
https://opencores.org/ocsvn/scarts/scarts/trunk
Subversion Repositories scarts
[/] [scarts/] [trunk/] [toolchain/] [scarts-gcc/] [gcc-4.1.1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [friend13.C] - Rev 12
Compare with Previous | Blame | View Log
// { dg-do run }
template <class T>
class C;
template <class U>
struct S
{
template <class V>
void f(V v)
{
C<V> cv;
cv.i = 3;
}
};
template <class T>
class C
{
template <class U>
template <class V>
friend void S<U>::f(V);
int i;
};
int main()
{
S<int> si;
si.f(3.0);
S<long> sl;
sl.f('c');
}