public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/100639] reverse_iterator<I>::reference erroneously uses iterator_traits<I>::reference instead of iter_reference_t<I>
Date: Thu, 10 Jun 2021 18:43:08 +0000	[thread overview]
Message-ID: <bug-100639-4-oP4W9OTG3G@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100639-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100639

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Patrick Palka
<ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:a50cc70f1b5ce3ae11528095fa3a1feadb206357

commit r11-8540-ga50cc70f1b5ce3ae11528095fa3a1feadb206357
Author: Patrick Palka <ppalka@redhat.com>
Date:   Thu May 20 14:08:17 2021 -0400

    libstdc++: Implement missing P0896R4 changes to reverse_iterator [PR100639]

    This implements the P0896R4 changes to reverse_iterator's member types
    value_type, difference_type and reference in C++20 mode, which fixes
    taking the reverse_iterator of an iterator with a non-integral
    difference_type (such as iota_view<long long>).

    libstdc++-v3/ChangeLog:

            PR libstdc++/100639
            * include/bits/stl_iterator.h (reverse_iterator::difference_type):
            In C++20 mode, define in terms of iter_difference_t as per P0896R4.
            (reverse_iterator::reference): Likewise, but with iter_reference_t.
            (reverse_iterator::value_type): Likewise, but with iter_value_t.
            * testsuite/std/ranges/adaptors/reverse.cc (test08): New test.
            * testsuite/24_iterators/reverse_iterator/100639.cc: New test.

    (cherry picked from commit d5cbe0f0d4b7bc11f80b2236521f90ec94e95767)

  parent reply	other threads:[~2021-06-10 18:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 16:50 [Bug c++/100639] New: reverse_view<I>::reference " barry.revzin at gmail dot com
2021-05-17 18:03 ` [Bug c++/100639] " redi at gcc dot gnu.org
2021-05-18 18:22 ` [Bug libstdc++/100639] reverse_iterator<I>::reference " ppalka at gcc dot gnu.org
2021-05-18 19:42 ` ppalka at gcc dot gnu.org
2021-05-20 18:11 ` cvs-commit at gcc dot gnu.org
2021-06-10 18:43 ` cvs-commit at gcc dot gnu.org [this message]
2021-06-10 18:49 ` cvs-commit at gcc dot gnu.org
2021-06-10 18:50 ` ppalka 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-100639-4-oP4W9OTG3G@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: link
Be 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).