You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/09/25 16:39:11 UTC

[GitHub] [arrow] pitrou commented on a change in pull request #8264: ARROW-8618: [C++] Clean up some redundant std::move()s

pitrou commented on a change in pull request #8264:
URL: https://github.com/apache/arrow/pull/8264#discussion_r495106328



##########
File path: cpp/src/arrow/testing/gtest_util.h
##########
@@ -108,9 +108,9 @@
   } while (false);
 
 #define ASSIGN_OR_HANDLE_ERROR_IMPL(handle_error, status_name, lhs, rexpr) \
-  auto status_name = (rexpr);                                              \
+  auto&& status_name = (rexpr);                                            \
   handle_error(status_name.status());                                      \
-  lhs = std::move(status_name).ValueOrDie();
+  lhs = std::move(status_name).ValueUnsafe();

Review comment:
       Isn't this a problem with `EXPECT_OK_AND_ASSIGN`? Basically `lhs` will get some undetermined value.




----------------------------------------------------------------
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:
users@infra.apache.org