Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
poor-circle committed Jan 23, 2025
1 parent cdff1db commit 38afb96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/ylt/coro_io/coro_io.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ class callback_awaitor_base {
void set_value(std::error_code ec, Args &&arg) const {
if constexpr (!std::is_same_v<Arg, std::error_code>) {
std::get<0>(obj->arg_) = std::move(ec);
std::get<1>(obj->arg_) = std::move(arg);
if constexpr (requires { std::get<1>(obj->arg_) = std::move(arg); }) {
std::get<1>(obj->arg_) = std::move(arg);
}
}
else {
obj->arg_ = std::move(ec);
Expand Down

0 comments on commit 38afb96

Please sign in to comment.