c++ - What is the point of `void func() throw(type)`? -
I know what it means to throw in a valid C ++ program function declaration? AFAIK it does nothing and is not used for anything.
#include & lt; Exceptions & gt; Zero func () throw (std :: exception) {} int main () {return 0; } This is an exception specification, and it is almost certainly one.
indicates that func
can throw a std :: exception
, and any other exception that emits func
The result will be the call.
Comments
Post a Comment