编译器警告(等级 1)C4813
“function”:局部类的友元函数必须之前已经声明
内部类中的友元函数未在外部类中声明。
以下示例生成 C4813:
// C4813.cpp
// compile with: /W1 /LD
void MyClass()
{
// void func();
class InnerClass
{
friend void func(); // C4813 uncomment declaration above
};
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈