westonpace commented on a change in pull request #9547: URL: https://github.com/apache/arrow/pull/9547#discussion_r580540188
########## File path: cpp/src/arrow/util/future.h ########## @@ -493,6 +493,28 @@ class ARROW_MUST_USE_TYPE Future { }); } + /// \brief Implicit constructor to create a finished future from a value + Future(ValueType val) : Future() { // NOLINT runtime/explicit + impl_ = FutureImpl::MakeFinished(FutureState::SUCCESS); + SetResult(std::move(val)); + } + + /// \brief Implicit constructor to create a future from a Result, enabling use + /// of macros like ARROW_ASSIGN_OR_RAISE. + Future(Result<ValueType> res) : Future() { // NOLINT runtime/explicit Review comment: Should we get rid of the static MakeFinished then? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org