The only practical effect of the throw specifier is that if something different from myExc
is thrown by your function, std::unexpected
will be called (instead of the normal unhandled exception mechanism).
To document the kind of exceptions that a function can throw, I typically do this:
bool
some_func() /* throw (myExc) */ {
}