You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "PragmaTwice (via GitHub)" <gi...@apache.org> on 2023/02/03 02:42:11 UTC

[GitHub] [arrow] PragmaTwice commented on pull request #34002: GH-34001: [C++] Add more rvalue overload for Status::operator&

PragmaTwice commented on PR #34002:
URL: https://github.com/apache/arrow/pull/34002#issuecomment-1414719846

   > The change seems fine but after the discussion in #13304 I'm not sure I'd advise anyone to use `f() & g()` as there is no way to guarantee short-circuiting and many readers will assume that is what is happening.
   
   Hi @westonpace, I think it is an important ability for this method to *forward reference* for better performance, not only for these rvalue created by the *temporary returned value*, but for more general rvalue in other cases, e.g.
   ```
   Status v = ..., v1 = ...;
   
   use(std::move(v) & v1);
   
   // assume v is no longer used here
   ```
   


-- 
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-unsubscribe@arrow.apache.org

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