Version: git master (using KDE 4.7.4) OS: Linux This code is legal in C++1x: class Foo; using Bar = Foo; Reproducible: Always Steps to Reproduce: Code that fails to parse: class Foo; using Bar = Foo; Actual Results: Excpected token ';' after 'identifier' found '=' Excpected token ';' after 'identifier' found '=' Unexpected token 'using' Unexpected token '=' Expected Results: The code should parse without errors.
confirmed, thanks
just asking: gcc 4.6 also doesn't support this syntax yet, does it?
Git commit 42e5828e95e60b4c3b0bb22de4fb24ee689f8ee5 by Milian Wolff. Committed on 21/02/2012 at 10:52. Pushed by mwolff into branch '4.3'. c++11 support: add parser-support for alias-declaration TODO: duchain integration M +11 -0 languages/cpp/parser/ast.h M +2 -1 languages/cpp/parser/dumptree.cpp M +24 -4 languages/cpp/parser/parser.cpp M +1 -0 languages/cpp/parser/tests/test_parser.h M +8 -0 languages/cpp/parser/tests/test_parser_cpp2011.cpp M +1 -0 languages/cpp/parser/visitor.cpp M +1 -0 languages/cpp/parser/visitor.h http://commits.kde.org/kdevelop/42e5828e95e60b4c3b0bb22de4fb24ee689f8ee5
Git commit 5c8072ce731abb32e06ce585e934c78ac27730c1 by Milian Wolff. Committed on 21/02/2012 at 11:25. Pushed by mwolff into branch '4.3'. c++11 support: alias-declaration is not handled just like a typedef in the duchain it's still missing support for template-aliases though M +11 -0 languages/cpp/cppduchain/declarationbuilder.cpp M +1 -0 languages/cpp/cppduchain/declarationbuilder.h M +1 -0 languages/cpp/cppduchain/tests/test_duchain.h M +35 -0 languages/cpp/cppduchain/tests/test_duchain_cpp2011.cpp M +6 -0 languages/cpp/parser/default_visitor.cpp M +1 -0 languages/cpp/parser/default_visitor.h http://commits.kde.org/kdevelop/5c8072ce731abb32e06ce585e934c78ac27730c1
That was fast :D As you might have guessed, only gcc 4.7 supports this new alias syntax. Keep in mind, that using-alias declaration can be templated. E.g. template <class A, class B, class C> struct T; template <class B1> using T1 = T<int, B1, char>;
right, see my last commit message ;-)
Works now.
Moving all the bugs from the CPP Parser. It was not well defined the difference between it and C++ Language Support and people kept reporting in both places indistinctively