exception-specification
How can std::runtime_error::runtime_error(const std::string&) meet std::exception's requirement of throw()?
std::exception requires that its constructor be throw(). Yet std::runtime_error accepts a std::string as its argument, which indicates that it\'s storing a std::string somewhere. Therefore, an assignm[详细]
2023-03-24 03:27 分类:问答Try/Catch or IF for handling missing Files?
Is it better to try/catch exceptions or to use if statements to handle the different outcomes? I am writing a short program in Java to copy files for convenience, and use the ifs to handle the event[详细]
2023-03-07 16:13 分类:问答How to get rid of "C++ exception specification ignored" warning
I recently got a dll that has been implemented by others. I have to use it in my application. In the header file of their class they have the function declaration[详细]
2023-01-05 06:38 分类:问答Exception Specification
I know that this feature will be deprecated in C++0x, but for me as a total novice it seems like a good idea to have it. Could anyone explain to开发者_运维知识库 me why isn\'t a good idea?Please see t[详细]
2022-12-24 02:20 分类:问答Exception specification when overriding a virtual function
Consider the following code: class A { public: virtual void f() throw ( int ) { } }; class B: public A { public:[详细]
2022-12-21 21:27 分类:问答