Commit 6a4c4cea authored by Max Katsev's avatar Max Katsev Committed by Facebook Github Bot

Make groupByAdjacent work for move-only types

Summary: Same as regular groupBy

Reviewed By: ot

Differential Revision: D17843280

fbshipit-source-id: 33d74d7ed84b8c46509bf186bfa52e31d6284015
parent 149fed4b
......@@ -1268,7 +1268,7 @@ class GroupByAdjacent : public Operator<GroupByAdjacent<Selector>> {
if (key == newKey) {
// grow the current group
values.push_back(value);
values.push_back(std::forward<Value>(value));
} else {
// flush the current group
GroupType group(key.value(), std::move(values));
......@@ -1279,7 +1279,7 @@ class GroupByAdjacent : public Operator<GroupByAdjacent<Selector>> {
// start a new group
key.emplace(newKey);
values.clear();
values.push_back(value);
values.push_back(std::forward<Value>(value));
}
return true;
});
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment