[LLVMdev] Using C++'11 language features in LLVM itself

dag at cray.com dag at cray.com
Tue Jan 8 16:31:47 PST 2013


Sean Silva <silvas at purdue.edu> writes:

> On Tue, Jan 8, 2013 at 6:45 PM, Chris Lattner <clattner at apple.com> wrote:
>> some version of GCC and later (linux folks should pick?)
>
> 4.6 is the official compiler on Ubuntu 12.04 (released 04/2012), which
> is the latest Long Term Support release (which come out every 2 years,
> with 3 years desktop support and 5 years server support), so I
> wouldn't push farther than that on Linux for the time being.

Does 4.6 work sufficiently for C++11?  I haven't used it in quite a
while.

> Another thing to bring up is that we have a lot of classes which have
> method pairs `foo_begin()` and `foo_end()` (e.g.
> `Function::arg_{begin,end}()`). These don't play nice with range-for
> loops (we are already seeing this come up in LLD). We probably should
> adopt some lightweight "range" class and a naming convention
> (`foo_all()`?) that will interact well with range-for. jyasskin, you
> have some standards proposals for such a class, maybe you could try
> bringing that into tree?

+1.  I've done this in my own code and it is so very nice.  :)

                             -David



More information about the llvm-dev mailing list