<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 3, 2014 at 12:26 AM, Chris Lattner <span dir="ltr"><<a href="mailto:sabre@nondot.org" target="_blank">sabre@nondot.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class=""><br>
On Mar 2, 2014, at 8:53 PM, Renato Golin <<a href="mailto:renato.golin@linaro.org">renato.golin@linaro.org</a>> wrote:<br>
<br>
> On 3 March 2014 12:32, Pete Cooper <<a href="mailto:peter_cooper@apple.com">peter_cooper@apple.com</a>> wrote:<br>
>> Would those work with a foreach construct? Perhaps I forgot to mention that was what I'm trying to work out here.<br>
>><br>
>> In example 3 I was wondering if we could define a method reverse(). We could use sfinae to wrap that around rbegin/rend if people like that style?<br>
><br>
> Sorry, I was too terse... ;)<br>
><br>
> If MF is a reverse_iterator, it'd just work, no? But to get the<br>
> reverse iterator, I think reverse() would be the best general pattern,<br>
> since you can adapt it to each container needs.<br>
<br>
</div>I'm not aware of the prior art or standards are here, but I think that a global reverse() adapter is the way to go.  Likewise, we should have a standard "enumerate()" adaptor like python.<br></blockquote>
<div><br></div><div>`enumerate` is going to be so much more annoying to use without tuple unpacking in the `for` syntax :(</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<span class="HOEnZb"><font color="#888888"><br>
-Chris<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
</div></div></blockquote></div><br></div></div>