編譯器警告 (層級 1) C4441
忽略 'cc1' 的呼叫慣例;已改用 'cc2'
Managed 使用者定義型別和全域函式 泛型中的成員函式必須使用 __clrcall呼叫慣例。 編譯器使用 __clrcall
。
範例
下列範例會產生 C4441。
// C4441.cpp
// compile with: /clr /W1 /c
generic <class ItemType>
void __cdecl Test(ItemType item) {} // C4441
// try the following line instead
// void Test(ItemType item) {}
ref struct MyStruct {
void __cdecl Test(){} // C4441
void Test2(){} // OK
};
意見反映
https://aka.ms/ContentUserFeedback。
即將推出:我們會在 2024 年淘汰 GitHub 問題,並以全新的意見反應系統取代並作為內容意見反應的渠道。 如需更多資訊,請參閱:提交及檢視以下的意見反映: