https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65022
Jonathan Wakely <redi at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> --- As the comments in the code say, those operators don't do range checking. It's undefined behaviour to call them with pos > size().