在C++中,您可以通过使用异常说明符指定函数可能会也可能不会抛出异常.例如:
void foo() throw(); // guaranteed not to throw an exception
void bar() throw(int); // may throw an exception of type int
void baz() throw(...); // may throw an exception of some unspecified type
Run Code Online (Sandbox Code Playgroud)
由于以下因素,我对实际使用它们表示怀疑:
你认为应该使用异常说明符吗?
请回答"是"或"否"并提供一些理由来证明您的答案.