From d369bb4b8af30e08cafe6fc433329536e4f61058 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 5 Mar 2017 19:50:25 +0100 Subject: [PATCH] use generic arg so we can construct coroutines from lambdas using = --- ostd/coroutine.hh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ostd/coroutine.hh b/ostd/coroutine.hh index 92e2c5d..3202eb8 100644 --- a/ostd/coroutine.hh +++ b/ostd/coroutine.hh @@ -205,10 +205,8 @@ namespace detail { template struct coroutine: detail::coro_base { - coroutine( - std::function &, A...)> func, - size_t ss = COROUTINE_DEFAULT_STACK_SIZE - ): + template + coroutine(F func, size_t ss = COROUTINE_DEFAULT_STACK_SIZE): detail::coro_base(&context_call, ss), p_func(std::move(func)) {}