8db7a05fd7
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. From-SVN: r271166 |
||
---|---|---|
.. | ||
async | ||
call_once | ||
condition_variable | ||
condition_variable_any | ||
future | ||
headers | ||
lock | ||
lock_guard | ||
mutex | ||
once_flag/cons | ||
packaged_task | ||
promise | ||
recursive_mutex | ||
recursive_timed_mutex | ||
scoped_lock | ||
shared_future | ||
shared_lock | ||
shared_mutex | ||
shared_timed_mutex | ||
this_thread | ||
thread | ||
timed_mutex | ||
try_lock | ||
unique_lock |