Skip to content

Commit

Permalink
fix ci windows: forward args
Browse files Browse the repository at this point in the history
..\uvio/io/stream.hpp(119): error C2664: 'auto uvio::detail::TaskPromise<T>::return_value(T &&) noexcept': cannot convert argument 1 from 'bool' to 'T &&'
        with
        [
            T=bool
        ]
..\uvio/io/stream.hpp(119): note: You cannot bind an lvalue to an rvalue reference
..\uvio/coroutine/task.hpp(57): note: see declaration of 'uvio::detail::TaskPromise<T>::return_value'
        with
        [
            T=bool
        ]
  • Loading branch information
uchenily committed May 17, 2024
1 parent 0b1afff commit 0320610
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions uvio/coroutine/task.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ namespace detail {
public:
auto get_return_object() noexcept -> Task<T>;

auto return_value(T &&value) noexcept {
value_ = std::move(value);
template <typename F>
auto return_value(F &&value) noexcept {
value_ = std::forward<F>(value);
}

auto result() const noexcept {
Expand Down

0 comments on commit 0320610

Please sign in to comment.