编译器错误 C2309
catch 处理程序需要带圆括号的异常声明
catch 处理程序没有带圆括号的类型。
以下示例生成 C2309:
// C2309.cpp
// compile with: /EHsc
#include <eh.h>
class C {};
int main() {
try {
throw "ooops!";
}
catch C {} // C2309
// try the following line instead
// catch( C ) {}
}
反馈
https://aka.ms/ContentUserFeedback。
即将发布:在整个 2024 年,我们将逐步淘汰作为内容反馈机制的“GitHub 问题”,并将其取代为新的反馈系统。 有关详细信息,请参阅:提交和查看相关反馈