J
John Harrison
Why isn't this legal code and is there any other way to achieve the
effect I want (i.e. make a template parameter the friend of a template
class).
template <class X> class I
{
friend class X;
private:
I() {}
};
class C
{
public:
I<C> f() { return I<C>(); }
};
int main()
{
C c;
c.f();
}
john
effect I want (i.e. make a template parameter the friend of a template
class).
template <class X> class I
{
friend class X;
private:
I() {}
};
class C
{
public:
I<C> f() { return I<C>(); }
};
int main()
{
C c;
c.f();
}
john