[
https://issues.apache.org/jira/browse/ARROW-5508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16864152#comment-16864152
]
Benjamin Kietzman commented on ARROW-5508:
------------------------------------------
Why not just use the [{{Range}}
concept|https://en.cppreference.com/w/cpp/language/range-for]? We already have
[arrow::util::LazyRange|https://github.com/apache/arrow/blob/aedba2c/cpp/src/arrow/util/lazy.h]
which provides the functionality you want, I think. If you prefer the
{{Iterator}} interface as you have written it then we should include an adapter
so that range for loops are easy
> [C++] Create reusable Iterator<T> interface
> --------------------------------------------
>
> Key: ARROW-5508
> URL: https://issues.apache.org/jira/browse/ARROW-5508
> Project: Apache Arrow
> Issue Type: Improvement
> Components: C++
> Reporter: Wes McKinney
> Priority: Major
> Fix For: 0.14.0
>
>
> We have various iterator-like classes. I envision a reusable interface like
> {code}
> template <typename T>
> class Iterator {
> public:
> virtual ~Iterator() = default;
> virtual Status Next(T* out) = 0;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)