Skip to content

Commit

Permalink
Missing explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
Jackarain committed Oct 2, 2024
1 parent 94811a3 commit 7472c38
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions include/ucoro/awaitable.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ namespace ucoro
{
using promise_type = awaitable_promise<T>;

awaitable(std::coroutine_handle<promise_type> h) : current_coro_handle_(h)
explicit awaitable(std::coroutine_handle<promise_type> h) : current_coro_handle_(h)
{
}

Expand Down Expand Up @@ -414,13 +414,14 @@ namespace ucoro
}
} // namespace ucoro


//////////////////////////////////////////////////////////////////////////

template <typename T, typename CallbackFunction>
struct CallbackAwaiter
{
public:
CallbackAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
explicit CallbackAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
{
}

Expand Down Expand Up @@ -449,7 +450,7 @@ template <typename CallbackFunction>
struct CallbackAwaiter<void, CallbackFunction>
{
public:
CallbackAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
explicit CallbackAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
{
}

Expand Down Expand Up @@ -484,7 +485,7 @@ template <typename T, typename CallbackFunction>
struct ExecutorAwaiter
{
public:
ExecutorAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
explicit ExecutorAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
{
}

Expand Down Expand Up @@ -516,7 +517,7 @@ template <typename CallbackFunction>
struct ExecutorAwaiter<void, CallbackFunction>
{
public:
ExecutorAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
explicit ExecutorAwaiter(CallbackFunction &&callback_function) : callback_function_(std::move(callback_function))
{
}

Expand Down

0 comments on commit 7472c38

Please sign in to comment.