public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/107371] New: __adaptor::_RangeAdaptor rejects the explicit move constructor case
@ 2022-10-24 7:26 hewillk at gmail dot com
2022-10-24 9:52 ` [Bug libstdc++/107371] " redi at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: hewillk at gmail dot com @ 2022-10-24 7:26 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107371
Bug ID: 107371
Summary: __adaptor::_RangeAdaptor rejects the explicit move
constructor case
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: hewillk at gmail dot com
Target Milestone: ---
libstdc++ rejects the following code:
#include <ranges>
struct A {
A() = default;
explicit A(A&&) { }
operator int() { return 5; }
};
int main() {
auto r = std::views::iota(0) | std::views::take(A{});
}
https://godbolt.org/z/EEarj7he8
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/107371] __adaptor::_RangeAdaptor rejects the explicit move constructor case
2022-10-24 7:26 [Bug libstdc++/107371] New: __adaptor::_RangeAdaptor rejects the explicit move constructor case hewillk at gmail dot com
@ 2022-10-24 9:52 ` redi at gcc dot gnu.org
2022-10-24 9:52 ` redi at gcc dot gnu.org
2024-02-02 15:53 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-24 9:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107371
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|unassigned at gcc dot gnu.org |ppalka at gcc dot gnu.org
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
This would fix it, but I don't know if there's a reason we pass by value here.
--- a/libstdc++-v3/include/std/ranges
+++ b/libstdc++-v3/include/std/ranges
@@ -960,7 +960,7 @@ namespace views::__adaptor
_Arg _M_arg;
constexpr
- _Partial(_Arg __arg)
+ _Partial(_Arg&& __arg)
: _M_arg(std::move(__arg))
{ }
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/107371] __adaptor::_RangeAdaptor rejects the explicit move constructor case
2022-10-24 7:26 [Bug libstdc++/107371] New: __adaptor::_RangeAdaptor rejects the explicit move constructor case hewillk at gmail dot com
2022-10-24 9:52 ` [Bug libstdc++/107371] " redi at gcc dot gnu.org
@ 2022-10-24 9:52 ` redi at gcc dot gnu.org
2024-02-02 15:53 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-24 9:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107371
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-10-24
Ever confirmed|0 |1
Status|UNCONFIRMED |ASSIGNED
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug libstdc++/107371] __adaptor::_RangeAdaptor rejects the explicit move constructor case
2022-10-24 7:26 [Bug libstdc++/107371] New: __adaptor::_RangeAdaptor rejects the explicit move constructor case hewillk at gmail dot com
2022-10-24 9:52 ` [Bug libstdc++/107371] " redi at gcc dot gnu.org
2022-10-24 9:52 ` redi at gcc dot gnu.org
@ 2024-02-02 15:53 ` ppalka at gcc dot gnu.org
2 siblings, 0 replies; 4+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-02-02 15:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107371
Patrick Palka <ppalka at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
Target Milestone|--- |14.0
--- Comment #2 from Patrick Palka <ppalka at gcc dot gnu.org> ---
This is incidentally fixed by r14-7218-gc48bedd1806722.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-02-02 15:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 7:26 [Bug libstdc++/107371] New: __adaptor::_RangeAdaptor rejects the explicit move constructor case hewillk at gmail dot com
2022-10-24 9:52 ` [Bug libstdc++/107371] " redi at gcc dot gnu.org
2022-10-24 9:52 ` redi at gcc dot gnu.org
2024-02-02 15:53 ` ppalka 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).