A throw-expression with no operand re-throws the exception currently being handled. Such an expression should appear only in a catch handler or in a function called from within a catch handler. The re-thrown exception object is the original exception object (not a copy). For example:
An empty throw statement tells the compiler that the function does not throw any exceptions. It is the equivalent to using __declspec(nothrow). For example:

本文介绍了 C++ 中如何使用空抛出表达式重新抛出当前正在处理的异常,并解释了这种表达式只应在 catch 处理程序或从 catch 处理程序内部调用的函数中出现的原因。此外,还展示了如何声明不抛出任何异常的函数。
421

被折叠的 条评论
为什么被折叠?



