分享方式:


編譯器警告 (層級 1) C4813

'function': 之前一定已經宣告過區域類別的 Friend 函式

內部類別中的 Friend 函式未在外部類別中宣告。

下列範例會產生 C4813:

// C4813.cpp
// compile with: /W1 /LD
void MyClass()
{
   // void func();
   class InnerClass
   {
      friend void func();   // C4813 uncomment declaration above
   };
}