public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "frankhb1989 at gmail dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/115514] New: Nonconforming reverse_iterator::operator-> Date: Sun, 16 Jun 2024 18:53:40 +0000 [thread overview] Message-ID: <bug-115514-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115514 Bug ID: 115514 Summary: Nonconforming reverse_iterator::operator-> Product: gcc Version: 15.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: frankhb1989 at gmail dot com Target Milestone: --- The last comment in LWG 1052 says "the wording in [reverse.iter.elem] (of P0896R4) for operator-> is equivalent to the PR for LWG 1052"; unfortunately this is not true. The adopted wording in P0896R4 uses `prev` which returns a prvalue for the call to `operator->`, while the PR uses an lvalue `tmp` for the call to `operator->`. Since `->` is no longer concerned in C++20's iterator requirements, there can be observable differences when the iterator having overloaded `operator->` with different ref-qualifiers in spite of the equivalence to the expression formed by `operator*` (for lvalues). The implementation in libc++ follows the standard wording literally. Actually the original implementation (https://reviews.llvm.org/D120180) has an explicit `std::move`, suggesting the difference has been acknowledged. (Another difference is it only applies the resolution for C++17 onward.)
next reply other threads:[~2024-06-16 18:53 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-06-16 18:53 frankhb1989 at gmail dot com [this message] 2024-06-18 9:01 ` [Bug libstdc++/115514] " redi at gcc dot gnu.org 2024-06-18 10:11 ` redi at gcc dot gnu.org 2024-06-18 11:16 ` de34 at live dot cn 2024-06-18 11:33 ` redi at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-115514-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).