Skip to content

Commit

Permalink
ARROW-8193: [C++] Fix gcc 4.8 compilation error with non-copyable typ…
Browse files Browse the repository at this point in the history
…es in Iterator<T>::ToVector

This fixes the failure for me in arrow/util/future_test.cc.

Closes #6706 from wesm/ARROW-8193

Authored-by: Wes McKinney <wesm+git@apache.org>
Signed-off-by: Antoine Pitrou <antoine@python.org>
  • Loading branch information
wesm authored and pitrou committed Mar 25, 2020
1 parent 2be95a9 commit bcaa18a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cpp/src/arrow/util/iterator.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,9 @@ class Iterator : public util::EqualityComparable<Iterator<T>> {
ARROW_ASSIGN_OR_RAISE(auto element, std::move(maybe_element));
out.push_back(std::move(element));
}
return out;
// ARROW-8193: On gcc-4.8 without the explicit move it tries to use the
// copy constructor, which may be deleted on the elements of type T
return std::move(out);
}

private:
Expand Down

0 comments on commit bcaa18a

Please sign in to comment.