Question from the one interview.
Please explain what does this C++ code mean:
void Foo() throw;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is a syntax error. The grammar for exception specification (C++98 §15.4) is:
Note that the parenthesis are required.
On the other hand,
means the function
Foo()will not throw any exceptions.