Skip to content

Commit

Permalink
添加std::forward
Browse files Browse the repository at this point in the history
  • Loading branch information
feixintianxia committed Nov 22, 2023
1 parent ad44a16 commit 1e713c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Thread/threadgroup.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class thread_group {

template<typename F>
std::thread *create_thread(F &&threadfunc) {
auto thread_new = std::make_shared<std::thread>(threadfunc);
auto thread_new = std::make_shared<std::thread>(std::forward<F>(threadfunc));
_thread_id = thread_new->get_id();
_threads[_thread_id] = thread_new;
return thread_new.get();
Expand Down

0 comments on commit 1e713c9

Please sign in to comment.