https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78830
--- Comment #10 from Andrzej Krzemienski <akrzemi1 at gmail dot com> --- For `std::prev()` it is UB, but by my reading of UB (http://eel.is/c++draft/intro.defs#defns.undefined) it is legal for the implementation to respond with "terminating a translation" "with the issuance of a diagnostic message", given that the UB in question can be detected statically.