diff --git a/f8/coroutine.cc b/f8/coroutine.cc index 01679c4..a094bcb 100644 --- a/f8/coroutine.cc +++ b/f8/coroutine.cc @@ -97,9 +97,10 @@ namespace f8 return awaiter->GetResult(); } - std::shared_ptr Coroutine::CoAwait(std::function<(std::shared_ptr)> cb) + std::shared_ptr Coroutine::CoAwait + (std::function)> cb) { - + return CoAwait(std::make_shared(cb)); } void Coroutine::Attach() diff --git a/f8/coroutine.h b/f8/coroutine.h index 6ca251f..2ba5846 100644 --- a/f8/coroutine.h +++ b/f8/coroutine.h @@ -19,7 +19,8 @@ namespace f8 void CoResume(); void CoYield(); std::shared_ptr CoAwait(std::shared_ptr awaiter); - std::shared_ptr CoAwait(std::function<(std::shared_ptr)> cb); + std::shared_ptr CoAwait + (std::function)> cb); std::shared_ptr Sleep(long long time); private: