Created
August 25, 2017 13:58
-
-
Save taeguk/773fd8ebd00236952c0578521fc966f6 to your computer and use it in GitHub Desktop.
ensure_future.cpp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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