pitrou commented on code in PR #50714:
URL: https://github.com/apache/arrow/pull/50714#discussion_r3676864746
##########
cpp/src/arrow/util/iterator.h:
##########
@@ -520,12 +517,11 @@ struct FilterIterator {
};
/// \brief Like MapIterator, but where the function can fail or reject
elements.
-template <
- typename Fn, typename From = typename
internal::call_traits::argument_type<0, Fn>,
- typename Ret = typename internal::call_traits::return_type<Fn>::ValueType,
- typename To = typename std::tuple_element<0, Ret>::type,
- typename Enable = typename std::enable_if<std::is_same<
- typename std::tuple_element<1, Ret>::type,
FilterIterator::Action>::value>::type>
+template <typename Fn, typename From,
+ typename Ret = typename std::invoke_result_t<Fn&, From>::ValueType,
+ typename To = std::tuple_element_t<0, Ret>,
+ typename Enable = std::enable_if_t<
Review Comment:
> Is it okay to push these changes @pitrou ?
Yes, please do.
--
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]