Chapter 38 Flashcards

1
Q

Is template compatible with friend functions

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is friend function

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Does ordinary function or class declared as friend of class template becomes friend of each instantiation of that template class

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is game of class template friend function instantiation

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Does all kind of specialization also become friends in the relationship of template and friend function

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly