I was looking an exception header and saw this:
virtual const char* what() const throw();
What bizarre thig is that?
I only know: virtual const char* what();
But what does that const throw();?
Printable View
I was looking an exception header and saw this:
virtual const char* what() const throw();
What bizarre thig is that?
I only know: virtual const char* what();
But what does that const throw();?
const declares that the arguments are not to be changed. Also, const functions cannot call non-const functions. Throw() means this function cannot throw any exceptions.
Thanks a lot!