When I inherit from std::exceptionto define my own exception type, I need to override a method what()that has the following signature:
virtual const char* what() const throw();
It definitely looks strange to me, as if there were two method names in the signature. This is some very specific syntax, for example, using pure virtual methods, for example:
virtual int method() const = 0;
or is it a function that can be used in some other way in another context? And if so, what can it be used for?
source
share