Skip to content

Commit

Permalink
Add reference variant of async_nb_future_await
Browse files Browse the repository at this point in the history
  • Loading branch information
agrippa committed May 16, 2020
1 parent 4b1057f commit bfff5c4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inc/hclib-async.h
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,14 @@ auto async_future_await(T&& lambda, std::vector<hclib_future_t *> &&futures) ->
nullptr, 0);
}

template <typename T>
auto async_nb_future_await(T&& lambda, std::vector<hclib_future_t *> &futures) ->
hclib::future_t<decltype(lambda())>* {
return async_future_await_at_helper(lambda, futures.data(), futures.size(),
nullptr, 1);
}


template <typename T>
auto async_nb_future_await(T&& lambda, std::vector<hclib_future_t *> &&futures) ->
hclib::future_t<decltype(lambda())>* {
Expand Down

0 comments on commit bfff5c4

Please sign in to comment.