修复问题
This commit is contained in:
@@ -297,11 +297,12 @@ public:
|
||||
std::invoke(std::forward<Function>(function), value_);
|
||||
});
|
||||
} else {
|
||||
std::optional<std::remove_cvref_t<Result>> result;
|
||||
using Value_Result = std::remove_cvref_t<Result>;
|
||||
std::optional<Value_Result> result;
|
||||
this->with_all_writable_locked([&](auto&) {
|
||||
result.emplace(std::invoke(std::forward<Function>(function), value_));
|
||||
});
|
||||
return std::move(*result);
|
||||
return Value_Result(std::move(*result));
|
||||
}
|
||||
}
|
||||
T snapshot() const requires std::copy_constructible<T> {
|
||||
|
||||
Reference in New Issue
Block a user