r271166 - in /trunk/libstdc++-v3: ChangeLog inc...
redi@gcc.gnu.org
redi@gcc.gnu.org
Tue May 14 12:01:00 GMT 2019
Author: redi
Date: Tue May 14 12:01:15 2019
New Revision: 271166
URL: https://gcc.gnu.org/viewcvs?rev=271166&root=gcc&view=rev
Log:
PR libstdc++/69724 avoid temporary in std::thread construction
The std::thread constructor creates (and then moves) an unnecessary
temporary copy of each argument. Optimize it to only make the one copy
that is required.
PR libstdc++/69724
* include/std/thread (thread::_State_impl, thread::_S_make_state):
Replace single _Callable parameter with variadic _Args pack, to
forward them directly to the tuple of decayed copies.
* testsuite/30_threads/thread/cons/69724.cc: New test.
Added:
trunk/libstdc++-v3/testsuite/30_threads/thread/cons/69724.cc
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/include/std/thread
More information about the Libstdc++-cvs
mailing list