<div dir="ltr">On Mon, May 27, 2013 at 7:35 AM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5"><p dir="ltr"><br>
On May 26, 2013 12:37 PM, "Rui Ueyama" <<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>> wrote:<br>
><br>
><br>
>> > +/// FilteredArgList - ArgList with filters. Useful to be used in<br>
>> > +/// range-based for loop to iterate over filtered arguments.<br>
>><br>
>> Could we just have/use a generic range abstraction (essentially a simple class template with two iterator members, one returned by begin, the other by end) rather than writing a custom type here?<br>
><br>
> What if begin is called twice? Is it okay to return the same object, not a new one?</p>
</div></div><p dir="ltr">If this is any kind of common iterator it must have the usual/obvious copy semantics (that's an iterator requirement) - essentially copying the result of begin should be as good as calling begin twice or there's something very strange/surprising going on (which isn't unheard of in llvm's iterators - so feel free to correct/tell me these are weird iterators that require a special case - I've not looked at them enough to know either way yet)</p>



</blockquote></div><div class="gmail_extra" style>No there's no such weird iterator in LLVM as far as I know. I just thought that we might want to avoid the overhead of copying the result of begin, which can be avoided by this patch. Or am I worry too much?</div>

</div></div>