https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66145
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Jonathan Wakely from comment #4) > The last handler matches, but it should have matched earlier. Doh, this is expected, because the C++03 ios::failure doesn't derive from runtime_error.