bkietz commented on code in PR #44477:
URL: https://github.com/apache/arrow/pull/44477#discussion_r1809408353
##########
cpp/src/arrow/result.h:
##########
@@ -294,7 +294,13 @@ class [[nodiscard]] Result : public
util::EqualityComparable<Result<T>> {
///
/// \return The stored non-OK status object, or an OK status if this object
/// has a value.
- constexpr const Status& status() const { return status_; }
+ constexpr const Status& status() const& { return status_; }
+
+ /// Gets the stored status object, or an OK status if a `T` value is stored.
+ ///
+ /// \return The stored non-OK status object, or an OK status if this object
+ /// has a value.
+ Status status() && { return status_; }
Review Comment:
Hmmm, this requires default construction of the value in the result or
constructing an error status placeholder. Maybe not worth it, but we should add
a comment here since others will also assume this is an error
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]