일단 거의 모든 버그 다 고칢..

This commit is contained in:
2025-05-02 11:16:25 +09:00
parent 6622cc8939
commit 14c325c428
10 changed files with 212 additions and 99 deletions

View File

@@ -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));