cyb70289 commented on code in PR #34002: URL: https://github.com/apache/arrow/pull/34002#discussion_r1099944171
########## cpp/src/arrow/status.h: ########## @@ -157,8 +157,10 @@ class ARROW_EXPORT [[nodiscard]] Status : public util::EqualityComparable<Status inline bool Equals(const Status& s) const; // AND the statuses. - inline Status operator&(const Status& s) const noexcept; - inline Status operator&(Status&& s) const noexcept; + inline Status operator&(const Status& s) const& noexcept; + inline Status operator&(const Status& s) && noexcept; + inline Status operator&(Status&& s) const& noexcept; + inline Status operator&(Status&& s) && noexcept; Review Comment: Looks to me "pass by value" is simpler. To reduce half of the functions. There might be overhead of an additional move, should be trivial. ``` Status operator&(Status s) const&; Status operator&(Status s) &&; ``` -- 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]
