Version: git master (using KDE 4.7.2) OS: Linux In C++11, there were added variadic templates. Support for them is, from what I've already seen, very nice in KDevelop, however there is one really annoying problem. It does not properly parse the code snippet from StR. Reproducible: Always Steps to Reproduce: template<typename ret, typename... Args> class Function<ret (*)(Args...)> { }; Actual Results: Unexpected token: '<' Unexpected token: '*' Unexpected token: ellipsis Expected Results: Correct parse results.
The bug is reproducible and not duplicated.
Blagovest: you have already seen that in another bug :) *** This bug has been marked as a duplicate of bug 288251 ***
Hello, how come that bug about variadic function pointer types is the same as bug about variadic macros...?
this is not a duplicate
The problem here is that the argument list is left unnamed. If I give it a name: template<typename ret, typename... Args> class Function<ret (*)(Args... name_of_args)> { }; then it parses fine. The same problem manifests in many different contexts: if I omit a name following an ellipsis, it gets underlined in red and looks unpleasant, if I add a name, it's nice and colorful. Some more examples: template<typename... Ts, typename Obj> void foo(Obj* obj, void (Obj::*method)(Ts...)); template<typename... Ts> void bar(Foo<Ts>...); template<typename, int...> struct Blah;
*** Bug 286208 has been marked as a duplicate of this bug. ***
Git commit 923bbcbd9b6306500b178b297977cb4199cef5a0 by Milian Wolff. Committed on 28/01/2013 at 02:01. Pushed by mwolff into branch '4.5'. C++11: Support abstract declarator only containing an ellipsis. Such parameter pack expansion can be unnamed and that often occurs for e.g. function pointers or similar. M +6 -0 languages/cpp/parser/parser.cpp M +7 -1 languages/cpp/parser/tests/test_parser_cpp2011.cpp http://commits.kde.org/kdevelop/923bbcbd9b6306500b178b297977cb4199cef5a0