共用方式為


編譯器錯誤 C2256

在 'function' 上使用 friend 規範不合法

解構函式或建構函式不能指定為 friend

下列範例會產生 C2256:

// C2256.cpp
// compile with: /c
class C {
public:
   friend ~C();   // C2256
   ~C();   // OK
};