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


##########
cpp/src/arrow/util/vector.h:
##########
@@ -78,8 +78,8 @@ std::vector<T> ReplaceVectorElement(const std::vector<T>& 
values, size_t index,
 
 template <typename T, typename Predicate>
 std::vector<T> FilterVector(std::vector<T> values, Predicate&& predicate) {
-  auto new_end =
-      std::remove_if(values.begin(), values.end(), 
std::forward<Predicate>(predicate));
+  auto new_end = std::stable_partition(values.begin(), values.end(),

Review Comment:
   I'm curious, is there any reason not to use `remove_if`?



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