| Summary: | Error when using decltype in template parameter | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Nathan Ridge <zeratul976> | ||||
| Component: | cdt-indexer | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 190122 [details]
testcase + fix
Fixed in 8.0 > 20110302. *** cdt cvs genie on behalf of mschorn *** Bug 337686: Function-call on dependent expression. [*] CPPASTFunctionCallExpression.java 1.31 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core/parser/org/eclipse/cdt/internal/core/dom/parser/cpp/CPPASTFunctionCallExpression.java?root=Tools_Project&r1=1.30&r2=1.31 [*] AST2TemplateTests.java 1.207 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt-core/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java?root=Tools_Project&r1=1.206&r2=1.207 *** Bug 337688 has been marked as a duplicate of this bug. *** |
For the following code: template <typename T> class A {}; template <typename Functor> void f(Functor functor) { A<decltype(functor())> a; // ERROR HERE } The parser gives the error: Invalid template arguments The code compiles fine with gcc >= 4.3