[cfe-dev] [LLVMdev] C++11 is here!!! (and it looks like it'll stay!)

David Chisnall David.Chisnall at cl.cam.ac.uk
Sat Mar 1 03:24:02 PST 2014


On 1 Mar 2014, at 02:48, Chandler Carruth <chandlerc at google.com> wrote:

> I flipped the build systems to use C++11 today by default. Nothing seems to have broken, folks seem happy, and the bots are making good progress.

Great news!  It would be nice now that we're all using C++11 to have something in the style guide about providing C++11-friendly iterators.  Currently, we have a lot of classes that implement foo_begin() and foo_end() methods.  It would be nice to have a common pattern for moving these under an inline class that implemented begin() and end(), so instead of having to do:

for (auto I=X.foo_begin(),E=X.foo_end() ; I!=E, ++E) {
	auto V = *I;
	...
}

We could do:

for (auto V : X.foo()) {
	...
}

David



More information about the cfe-dev mailing list