9

Suppose you have class A like this:

template <typename T, typename U>
class A;

And class B like this:

template <typename T>
class B;

And now you want both classes be friends when T is the same type, is this possible?

So for example A<int, long> is friends with B<int> while B<int> is friends with A<int, U> where U can be any type.

  • It doesn't appear to be allowed. Can you confirm whether [this](http://stackoverflow.com/a/1458897/16287) answers your question? – Drew Dormann Apr 04 '13 at 00:06

0 Answers0