Add llvm::enumerate() to stl extras

Adrian McCarthy via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 13:06:31 PDT 2016


Should `enumerator_impl::iterator` have the extra baggage for
`std::iterator_traits`, like typedefs for `value_type`,
`iterator_category`, and such?

On the other hand, if this is strictly for range-based for loops, then
perhaps you don't even need the post-fix increment.


On Thu, Sep 29, 2016 at 12:34 PM, Zachary Turner via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> Yes, you beat me to it.  I just used container in my example, but the
> implementation is supposed to work with any range
>
> On Thu, Sep 29, 2016 at 12:33 PM Krzysztof Parzyszek via llvm-commits <
> llvm-commits at lists.llvm.org> wrote:
>
>> On 9/29/2016 2:27 PM, Krzysztof Parzyszek via llvm-commits wrote:
>> >
>> > How about enumerate(range) instead of container?
>>
>> Nevermind.  It's the same thing.
>>
>> --
>> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
>> hosted by The Linux Foundation
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160929/ddd6b92e/attachment.html>


More information about the llvm-commits mailing list