編譯器錯誤 C3541
'type': typeid 無法套用至包含 'auto' 的類型
typeid 運算子無法套用至指定的型別,因為它包含 auto
規範。
範例
下列範例會產生 C3541。
// C3541.cpp
// Compile with /Zc:auto
#include <typeinfo>
int main() {
auto x = 123;
typeid(x); // OK
typeid(auto); // C3541
return 0;
}
另請參閱
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應