public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ppalka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libstdc++/100795] ranges::sample should not use std::sample directly
Date: Fri, 16 Jul 2021 16:01:00 +0000 [thread overview]
Message-ID: <bug-100795-4-FYCwerxPKP@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-100795-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100795
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppalka at gcc dot gnu.org
--- Comment #6 from Patrick Palka <ppalka at gcc dot gnu.org> ---
(In reply to 康桓瑋 from comment #2)
> ranges::inplace_merge has the same issue:
>
>
> #include <algorithm>
> #include <array>
> #include <ranges>
>
> int main() {
> std::array a{42, 42, 42};
> auto r = std::views::iota(0, 3) |
> std::views::transform([&a](int i) -> int& { return a[i]; });
> std::ranges::inplace_merge(r, r.begin());
> }
>
> https://godbolt.org/z/q6jbxGMjd
Hmm, this one seems more like a problem in the specification of
transform_view::iterator_category. Shouldn't r's iterator_category be
random_access_iterator here? AFAICT it satisfies all the requirements of
__LegacyRandomAccessIterator.
next prev parent reply other threads:[~2021-07-16 16:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-27 10:07 [Bug libstdc++/100795] New: " hewillk at gmail dot com
2021-05-27 10:17 ` [Bug libstdc++/100795] " redi at gcc dot gnu.org
2021-05-27 11:55 ` hewillk at gmail dot com
2021-05-27 12:11 ` hewillk at gmail dot com
2021-05-27 14:53 ` hewillk at gmail dot com
2021-05-27 14:58 ` hewillk at gmail dot com
2021-07-16 16:01 ` ppalka at gcc dot gnu.org [this message]
2021-07-16 16:22 ` hewillk at gmail dot com
2021-11-23 16:54 ` barry.revzin at gmail dot com
2022-02-16 0:44 ` pinskia at gcc dot gnu.org
2022-07-20 6:30 ` hewillk at gmail dot com
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-100795-4-FYCwerxPKP@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).