'identifier': 형식 정의 중에는 'friend'를 사용할 수 없습니다.
선언에는 friend
전체 클래스 선언이 포함됩니다. 선언은 friend
멤버 함수 또는 정교한 형식 지정자를 지정할 수 있지만 전체 클래스 선언은 지정할 수 없습니다.
다음 샘플에서는 C2326을 생성합니다.
// C2391.cpp
// compile with: /c
class D {
void func( int );
};
class A {
friend class B { int i; }; // C2391
// OK
friend class C;
friend void D::func(int);
};