From 5c209872b54de2dbea878e156ad39a31421b2045 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 5 Mar 2017 21:56:41 +0100 Subject: [PATCH] fix narrowing --- ostd/coroutine.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ostd/coroutine.hh b/ostd/coroutine.hh index b660fca..ad0689f 100644 --- a/ostd/coroutine.hh +++ b/ostd/coroutine.hh @@ -256,7 +256,7 @@ struct coroutine: detail::coro_base { } private: R call(A ...args) { - if constexpr(sizeof...(A)) { + if constexpr(sizeof...(A) != 0) { this->p_args = std::forward_as_tuple(std::forward(args)...); } this->p_ctx.call(); @@ -267,7 +267,7 @@ private: template R call_helper(std::index_sequence) { - if constexpr(sizeof...(A)) { + if constexpr(sizeof...(A) != 0) { return p_func(*this, std::forward(std::get(this->p_args))...); } else { return p_func(*this);