Lines Matching full:friend
3 // C++98 [class.friend]p7:
4 // C++11 [class.friend]p9:
5 // A name nominated by a friend declaration shall be accessible in
6 // the scope of the class containing the friend declaration.
16 friend void X::f(); // expected-error {{friend function 'f' is a private member of 'test0::X'}}
27 friend void X::f(); // expected-error {{friend function 'f' is a private member of 'test1::X'}}
37 friend class Y<int>;
41 friend void X::f();
53 friend class Y<int>;
57 friend void X::f(); // expected-error {{friend function 'f' is a private member of 'test3::X'}}
70 friend void X<T>::f();
81 friend void X<T>::f(); // expected-error {{friend function 'f' is a private member of 'test5::X<int>'}}
87 // Dependently-scoped, wrong friend.
93 friend class Y<float>;
97 friend void X<T>::f(); // expected-error {{friend function 'f' is a private member of 'test6::X<int>'}}
103 // Dependently-scoped, right friend.
109 friend class Y<int>;
113 friend void X<T>::f();