Chapter 38 Flashcards
Is template compatible with friend functions
Yes
What is friend function
A friend function of a class is defined outside that class’ scope but it has the right to access all private and protected members of the class.
Does ordinary function or class declared as friend of class template becomes friend of each instantiation of that template class
Yes
What is game of class template friend function instantiation
When a friend function of template class instantiated, then its instance is friend with instance of template class. This applies both for specific type parameter and different type parameters.
Does all kind of specialization also become friends in the relationship of template and friend function
Yes