westonpace commented on a change in pull request #9095: URL: https://github.com/apache/arrow/pull/9095#discussion_r564788723
########## File path: cpp/src/arrow/result.h ########## @@ -331,6 +332,7 @@ class ARROW_MUST_USE_TYPE Result : public util::EqualityComparable<Result<T>> { return ValueUnsafe(); } T& operator*() & { return ValueOrDie(); } + T* operator->() { return &ValueOrDie(); } Review comment: @bkietz I'm pretty sure this is your contribution. Is this something I should add? I'm not entirely sure of the semantics. I think you mean... ``` T operator*() && { return MoveValueOrDie(); } ``` ...I think its use would be limited. Given that ARROW_ASSIGN_OR_RAISE will avoid having to use the * operator most of the time. ---------------------------------------------------------------- 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