最新的git-p4脚本(https://github.com/ermshiperete/git-p4)有一个"搁置"但没有"取消搁置"的命令.如何使用它取消更改?
以下代码将编译但在运行时崩溃:
int main() {
try {
throw;
}
catch(...){
cout<<"In catch";
}
return 0;
}
Run Code Online (Sandbox Code Playgroud)
结果:"hello.exe中0x7c812a5b处的未处理异常:Microsoft C++异常:[rethrow] @ 0x00000000"
为什么编译器允许代码编译?编译器检查此代码是否是catch块的一部分看起来不是那么困难.