Summary: | Parser does not understand function pointer type with variadic templated types as parameters | ||
---|---|---|---|
Product: | [Applications] kdevelop | Reporter: | Griwes <griwes> |
Component: | Language Support: CPP (old) | Assignee: | kdevelop-bugs-null |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | blagozlatev, illissius, myriam |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | 4.2.3 | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/kdevelop/923bbcbd9b6306500b178b297977cb4199cef5a0 | Version Fixed In: | |
Sentry Crash Report: |
Description
Griwes
2011-12-07 20:16:43 UTC
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 |