https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89452
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> ---
(In reply to Baykov Nikita from comment #0)
> 4. pptr() is a null pointer. Paragraphs [stringbuf.cons]/3,
> [streambuf.cons]/1, [stringbuf. members]/3 guarantee it.
> 5. [stringbuf.virtuals]/10 specifies that the positioning operation fails,
> i.e., pos_type(-1) should be returned.
I disagree. p10 says it fails if pptr() is zero and newoff is nonzero. Because
way == ios_base::beg Table 113 says that newoff is zero, therefore it doesn't
fail.
This was changed many years ago by https://wg21.link/lwg453