public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/112453] New: <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value
@ 2023-11-09 3:05 hewillk at gmail dot com
2023-11-09 13:35 ` [Bug libstdc++/112453] " ppalka at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2023-11-09 3:05 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112453
Bug ID: 112453
Summary: <ranges>: __take_of_repeat_view/__drop_of_repeat_view
should forwards __r._M_value
Product: gcc
Version: 14.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
The current wording clearly indicates *E.value_ instead of *r.value_.
https://godbolt.org/z/GcnbesbEE
#include <ranges>
#include <memory>
int main() {
auto t = std::views::repeat(std::make_unique<int>(5), 4) |
std::views::take(2);
auto d = std::views::repeat(std::make_unique<int>(5), 4) |
std::views::drop(2);
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/112453] <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value
2023-11-09 3:05 [Bug libstdc++/112453] New: <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value hewillk at gmail dot com
@ 2023-11-09 13:35 ` ppalka at gcc dot gnu.org
2023-11-09 20:15 ` cvs-commit at gcc dot gnu.org
2024-05-21 9:18 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-11-09 13:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112453
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |13.3
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2023-11-09
Keywords| |rejects-valid
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
--- Comment #1 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Confirmed, thanks for catching and reporting this.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/112453] <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value
2023-11-09 3:05 [Bug libstdc++/112453] New: <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value hewillk at gmail dot com
2023-11-09 13:35 ` [Bug libstdc++/112453] " ppalka at gcc dot gnu.org
@ 2023-11-09 20:15 ` cvs-commit at gcc dot gnu.org
2024-05-21 9:18 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-09 20:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112453
--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:
https://gcc.gnu.org/g:d63282fa5b587f1b994210212f236b998a332995
commit r14-5297-gd63282fa5b587f1b994210212f236b998a332995
Author: Patrick Palka <ppalka@redhat.com>
Date: Thu Nov 9 15:15:08 2023 -0500
libstdc++: Fix forwarding in __take/drop_of_repeat_view [PR112453]
We need to respect the value category of the repeat_view passed to these
two functions when accessing the view's _M_value member. This revealed
that the space-efficient partial specialization of __box lacks && overloads
of operator* to match those of the primary template (inherited from
std::optional).
PR libstdc++/112453
libstdc++-v3/ChangeLog:
* include/std/ranges (__detail::__box<_Tp>::operator*): Define
&& overloads as well.
(__detail::__take_of_repeat_view): Forward __r when accessing
its _M_value member.
(__detail::__drop_of_repeat_view): Likewise.
* testsuite/std/ranges/repeat/1.cc (test07): New test.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/112453] <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value
2023-11-09 3:05 [Bug libstdc++/112453] New: <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value hewillk at gmail dot com
2023-11-09 13:35 ` [Bug libstdc++/112453] " ppalka at gcc dot gnu.org
2023-11-09 20:15 ` cvs-commit at gcc dot gnu.org
@ 2024-05-21 9:18 ` jakub at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-05-21 9:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112453
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|13.3 |13.4
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 13.3 is being released, retargeting bugs to GCC 13.4.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-21 9:18 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-09 3:05 [Bug libstdc++/112453] New: <ranges>: __take_of_repeat_view/__drop_of_repeat_view should forwards __r._M_value hewillk at gmail dot com
2023-11-09 13:35 ` [Bug libstdc++/112453] " ppalka at gcc dot gnu.org
2023-11-09 20:15 ` cvs-commit at gcc dot gnu.org
2024-05-21 9:18 ` jakub at gcc dot gnu.org
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).