<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Mar 22, 2013, at 2:27 AM, Michael Spencer <<a href="mailto:bigcheesegs@gmail.com">bigcheesegs@gmail.com</a>> wrote:</div><blockquote type="cite"><div dir="ltr"><div class="gmail_extra"><div>On Thu, Mar 21, 2013 at 2:53 PM, John McCall <span dir="ltr"><<a href="mailto:rjmccall@apple.com" target="_blank">rjmccall@apple.com</a>></span> wrote:<br></div><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div>On Jan 14, 2013, at 10:55 PM, Michael J. Spencer <<a href="mailto:bigcheesegs@gmail.com" target="_blank">bigcheesegs@gmail.com</a>> wrote:<br>


> Author: mspencer<br>
> Date: Tue Jan 15 00:55:25 2013<br>
> New Revision: 172512<br>
><br>
> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=172512&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=172512&view=rev</a><br>
> Log:<br>
> [Core] Add iterator ranges.<br>
><br>
> This is based on code by Jeffrey Yasskin. It has been modified to compile<br>
> with MSVC and reformated to LLVM style.<br>
<br>
</div>Very late comment, I know, but this seems like a reasonable addition to<br>
LLVM's ADT library, especially if it can be adapted to at least allow instantiation<br>
under C++03.  We've been talking for some time about allowing non-core LLVM<br>
subsystems (like the static analyzer) use C++11, and of course there are tons of<br>
external projects that are free to use C++11 as they like.  LLVM and Clang have<br>
a *lot* of types with "tagged" iterators, like llvm::Value::use_iterator and<br>
clang::DeclContext::decl_iterator;  with this class in-tree, it would become very<br>
straightforward to start adding range adapters to a lot of those interfaces.<br>
That would be a pretty nice enhancement to get in for the 3.3 release.<br>
<span><font color="#888888"><br>
John.<br>
</font></span></blockquote></div><br></div><div class="gmail_extra">I originally intended to port as much as possible to C++03 and stick it in LLVM ADT, but there were concerns with adopting this specific API as it may be significantly different from what gets standardized in C++1y.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra" style="">I'm in favor of some support for the range concept in LLVM, even if it's just a begin/end pair.</div></div></blockquote><br></div><div>Yeah, I think a range<T> that just pairs a begin and end iterator and lets you</div><div>iterate over it with the C++11 for-range syntax would provide roughly 99% of</div><div>the utility of the more general thing.</div><div><br></div><div>Do you want to handle this, or should I just sketch out a range with zero bells</div><div>and whistles and commit it?</div><div><br></div><div>John.</div></body></html>