| Summary: | False positive error when unpacking a variadic parameter pack | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Nathan Ridge <zeratul976> |
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug |
| Version: | 8.1.0 | ||
| Target Milestone: | 8.1.0 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
Good catch! Added testcase and fix. |
In the following code: template <typename... Args> void foo(int, int, Args...); template <typename... Args> void bar(Args... args) { foo(args...); // ERROR HERE: "Invalid arguments: Candidates are: void foo(int, int, #0 ...)" } It is wrong to treat the call as an error in general, because it could be that bar() is only ever called with parameters such that the first two are convertible to 'int'.