pitrou commented on code in PR #44789:
URL: https://github.com/apache/arrow/pull/44789#discussion_r1850706599


##########
cpp/src/arrow/util/iterator.h:
##########
@@ -292,18 +292,17 @@ class TransformIterator {
         finished_ = true;
         return next_res.status();
       }
-      auto next = *next_res;

Review Comment:
   Given this line:
   ```
       inlined from ‘arrow::Result<T>::Result(U&&) [with U = 
std::shared_ptr<arrow::Buffer>; E = void; T = 
std::optional<std::shared_ptr<arrow::Buffer> >]’ at 
/home/raulcd/code/arrow/cpp/src/arrow/result.h:165:19,
   ```
   it seems that we're implicitly converting from `U` to 
`Result<std::optional<U>>` and that's too much for the compiler to swallow?
   
   We don't necessarily need to care about this warning. That said, I agree 
that the following would be better anyway:
   ```c++
   auto next = std::move(*next_res);
   ```



-- 
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]

Reply via email to