일단 거의 모든 버그 다 고칢..
This commit is contained in:
@@ -39,7 +39,7 @@ public:
|
||||
requires (!std::is_same_v<std::decay_t<_Callable>, Thread>) &&
|
||||
(!std::is_void_v<std::invoke_result_t<_Callable, _Args...>>)
|
||||
Thread(_Callable&& __f, _Args&&... __args) {
|
||||
auto boundFunc = [this, __f = std::move(__f), ... __args = std::move(__args)]() mutable {
|
||||
auto boundFunc = [this, __f, ... __args = std::move(__args)]() mutable {
|
||||
returnValuePtr = new std::invoke_result_t<_Callable, _Args...>(__f(std::move(__args)...));
|
||||
};
|
||||
std::packaged_task<void()>* funcPtr = new std::packaged_task<void()>(std::move(boundFunc));
|
||||
@@ -53,7 +53,7 @@ public:
|
||||
requires (!std::is_same_v<std::decay_t<_Callable>, Thread>) &&
|
||||
std::is_void_v<std::invoke_result_t<_Callable, _Args...>>
|
||||
Thread(_Callable&& __f, _Args&&... __args) {
|
||||
auto boundFunc = [this, __f = std::move(__f), ... __args = std::move(__args)]() mutable {
|
||||
auto boundFunc = [this, __f, ... __args = std::move(__args)]() mutable {
|
||||
__f(std::move(__args)...);
|
||||
};
|
||||
std::packaged_task<void()>* funcPtr = new std::packaged_task<void()>(std::move(boundFunc));
|
||||
|
||||
Reference in New Issue
Block a user