public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/106695] [11/12 Regression] Explicit copy constructor does not work for a parameter passed via std::async
[not found] <bug-106695-4@http.gcc.gnu.org/bugzilla/>
@ 2022-09-07 14:16 ` cvs-commit at gcc dot gnu.org
2022-09-07 17:49 ` cvs-commit at gcc dot gnu.org
2022-09-07 17:54 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-07 14:16 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106695
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:47f0bd269403762ddb71b8c6165b30ace4f70a8b
commit r12-8747-g47f0bd269403762ddb71b8c6165b30ace4f70a8b
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Aug 22 15:42:17 2022 +0100
libstdc++: Fix for explicit copy ctors in <thread> and <future> [PR106695]
When I changed std::thread and std::async to avoid unnecessary move
construction of temporaries, I introduced a regression where types with
an explicit copy constructor could not be passed to std::thread or
std::async. The fix is to add a constructor instead of using aggregate
initialization of an unnamed temporary.
libstdc++-v3/ChangeLog:
PR libstdc++/106695
* include/bits/std_thread.h (thread::_State_impl): Forward
individual arguments to _Invoker constructor.
(thread::_Invoker): Add constructor. Delete copies.
* include/std/future (__future_base::_Deferred_state): Forward
individual arguments to _Invoker constructor.
(__future_base::_Async_state_impl): Likewise.
* testsuite/30_threads/async/106695.cc: New test.
* testsuite/30_threads/thread/106695.cc: New test.
(cherry picked from commit 5abe0657553580bd1b7488dd84d55138a8d9f23c)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/106695] [11/12 Regression] Explicit copy constructor does not work for a parameter passed via std::async
[not found] <bug-106695-4@http.gcc.gnu.org/bugzilla/>
2022-09-07 14:16 ` [Bug libstdc++/106695] [11/12 Regression] Explicit copy constructor does not work for a parameter passed via std::async cvs-commit at gcc dot gnu.org
@ 2022-09-07 17:49 ` cvs-commit at gcc dot gnu.org
2022-09-07 17:54 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-09-07 17:49 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106695
--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-11 branch has been updated by Jonathan Wakely
<redi@gcc.gnu.org>:
https://gcc.gnu.org/g:da67352690c8ed7f3045487e6e1ea391aeab7fc8
commit r11-10242-gda67352690c8ed7f3045487e6e1ea391aeab7fc8
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Mon Aug 22 15:42:17 2022 +0100
libstdc++: Fix for explicit copy ctors in <thread> and <future> [PR106695]
When I changed std::thread and std::async to avoid unnecessary move
construction of temporaries, I introduced a regression where types with
an explicit copy constructor could not be passed to std::thread or
std::async. The fix is to add a constructor instead of using aggregate
initialization of an unnamed temporary.
libstdc++-v3/ChangeLog:
PR libstdc++/106695
* include/bits/std_thread.h (thread::_State_impl): Forward
individual arguments to _Invoker constructor.
(thread::_Invoker): Add constructor. Delete copies.
* include/std/future (__future_base::_Deferred_state): Forward
individual arguments to _Invoker constructor.
(__future_base::_Async_state_impl): Likewise.
* testsuite/30_threads/async/106695.cc: New test.
* testsuite/30_threads/thread/106695.cc: New test.
(cherry picked from commit 5abe0657553580bd1b7488dd84d55138a8d9f23c)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug libstdc++/106695] [11/12 Regression] Explicit copy constructor does not work for a parameter passed via std::async
[not found] <bug-106695-4@http.gcc.gnu.org/bugzilla/>
2022-09-07 14:16 ` [Bug libstdc++/106695] [11/12 Regression] Explicit copy constructor does not work for a parameter passed via std::async cvs-commit at gcc dot gnu.org
2022-09-07 17:49 ` cvs-commit at gcc dot gnu.org
@ 2022-09-07 17:54 ` redi at gcc dot gnu.org
2 siblings, 0 replies; 3+ messages in thread
From: redi at gcc dot gnu.org @ 2022-09-07 17:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106695
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|ASSIGNED |RESOLVED
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Fixed for 12.3 and 11.4
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-09-07 17:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-106695-4@http.gcc.gnu.org/bugzilla/>
2022-09-07 14:16 ` [Bug libstdc++/106695] [11/12 Regression] Explicit copy constructor does not work for a parameter passed via std::async cvs-commit at gcc dot gnu.org
2022-09-07 17:49 ` cvs-commit at gcc dot gnu.org
2022-09-07 17:54 ` redi 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).