-/* Copyright (c) 2015-2019. The SimGrid Team.
+/* Copyright (c) 2015-2020. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
throw std::future_error(std::future_errc::no_state);
}
}
+
private:
boost::variant<boost::blank, T, std::exception_ptr> value_;
};
}
}
-template <class P, class F> auto fulfill_promise(P& promise, F&& code) -> decltype(promise.set_value())
+template <class R, class F> auto fulfill_promise(R& promise, F&& code) -> decltype(promise.set_value())
{
try {
std::forward<F>(code)();