Skip to content

Instantly share code, notes, and snippets.

@hkaiser
Created June 1, 2017 21:15
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 hkaiser/1e1b37aefd1cee5956398589ee6cd8ab to your computer and use it in GitHub Desktop.
Save hkaiser/1e1b37aefd1cee5956398589ee6cd8ab to your computer and use it in GitHub Desktop.
// Inhibit converting a future<future<T>> to a future<void> in one step.
template <typename T>
future(future<future<T> >&& other,
typename std::enable_if<std::is_void<R>::value, T>::type* = nullptr
) = delete;
// Inhibit converting a future<shared_future<T>> to a future<void> in
// one step.
template <typename T>
future(future<shared_future<T> >&& other,
typename std::enable_if<std::is_void<R>::value, T>::type* = nullptr
) = delete;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment