Created attachment 58014 [details] That's how far I got Version: 4.2.0 (using KDE 4.6.1) OS: Linux Hello. I'm using gcc-4.6 in order to use easier access to list containers. Sadly KDevelop doesn't recognize the additional possible syntax. I tried to introduce it to languages/cpp/parser/parser.cpp but... Well, I don't know the code enough to make usable changes... Tree theory never was my preferred lecture anyway so lexers are pain ^_^" Could someone please implement this? Thx. Reproducible: Always Steps to Reproduce: list<T> tlist; for(T& object : tlist) { cout << object << endl;} Actual Results: Expected token ';' after identifier' found ':' Expected Results: Autocompletition and further loop parsing and this stuff I wrote a patch, but I don't get further then this. Perhaps someone who knows this code better then me can get it working.
please add links to the specification explaining the new syntax and how it is supposed to be handled.
(In reply to comment #1) > please add links to the specification explaining the new syntax and how it is > supposed to be handled. Thank you for your answer. Here is the PDF with the syntactical description: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2049.pdf
just pushed this to the c++0x branch, once the TODOs are resolved it will be merged into master. commit 20af607a58ec76aab228244570c983667b5d01d5 Author: Milian Wolff <mail@milianw.de> Date: Tue May 31 13:04:08 2011 +0200 add parser support for range-based for TODO: unit test for code generation TODO: duchain integration + unit test on that side
seems to work now