Skip to content

Instantly share code, notes, and snippets.

@taeguk
Created August 25, 2017 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save taeguk/773fd8ebd00236952c0578521fc966f6 to your computer and use it in GitHub Desktop.
Save taeguk/773fd8ebd00236952c0578521fc966f6 to your computer and use it in GitHub Desktop.
ensure_future.cpp
template <typename T>
struct ensure_future
{
typedef hpx::future<T> type;
static type get(T && t)
{
return hpx::make_ready_future(std::move(t));
}
static type get(hpx::future<T> && t)
{
return std::move(t);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment