When i am inheriting from std::exception
in order to define my own exception type, i need to override the what()
method, which has the following signature:
virtual const char* what() const throw();
This definitely looks strange to me, like if there were two method names in the signature. Is this some very specific syntax, like with pure virtual methods, e.g.:
virtual int method() const = 0;
or is this a feature, that could somehow be used in another context, too? And if so, for what could it be used?