|
What you write here is friend class E <T> ;, this means that E must be a template class, and the friend relationship between E and A is bound, that is, E and A corresponding to each T It is a friend relationship, and E and A corresponding to different T are not friend relationships.
PS: Friends and templates are troublesome. There are some syntaxes that are interpreted differently between compilers, and they seem to be a lot worse, so don't take it too seriously, otherwise you will be horny. |
|