PragmaTwice opened a new issue, #34001:
URL: https://github.com/apache/arrow/issues/34001

   ### Describe the enhancement requested
   
   
https://github.com/apache/arrow/blob/a0d0ecee71b99b45f2c1b269c70033d39b982d00/cpp/src/arrow/status.h#L160-L161
   
   Currently there are two overloads for `Status::operator&` to achieve 
"reference forwarding", but only for the rhs (i.e. `const Status& s` or 
`Status&& s`), the reference type of lhs value (i.e. `*this`) cannot be 
forwarded. e.g.
   ```c++
   Status v;
   Status f(/* some parameters */);
   Status g(/* some parameters */);
   
   auto v1 = v & f(); // OK! the rhs rvalue can be moved into result
   auto v2 = f() & v; // Ooops, the lhs rvalue cannot be moved into result
   auto v3 = f() & g(); // Ooops, same as above
   ```
   
   We can add more overloads to forward reference of lhs for better performance.
   
   
   ### Component(s)
   
   C++


-- 
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: github-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to