<p dir="ltr"><br>
On May 26, 2013 12:37 PM, "Rui Ueyama" <<a href="mailto:ruiu@google.com">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>
<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>