| Summary: | Template resolution problem with function template arguments | ||
|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Sergey Prigogin <eclipse.sprigogin> |
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> |
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> |
| Severity: | normal | ||
| Priority: | P3 | CC: | cdtdoug, marc.khouzam, yevshif |
| Version: | 8.0 | ||
| Target Milestone: | 8.1.2 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
*** cdt cvs genie on behalf of sprigogin *** Bug 334472 - Failing test case. [*] AST2TemplateTests.java 1.204 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/all/org.eclipse.cdt.core.tests/parser/org/eclipse/cdt/core/parser/tests/ast2/AST2TemplateTests.java?root=Tools_Project&r1=1.203&r2=1.204 The underlying issue is the same as for bug 299911. We need to model and store dependent expressions, for later instantiation. The template argument 'F<U>' for the base class G<F<U> > is the dependent expression that we currently cannot model. Fixed by Markus' changes for bug 299911. |
template <typename T> class M {}; template<typename U> U F(); template <M<int> (*Func)()> struct G { M<int> operator()(); }; template <typename U> struct H : public G<F<U> > {}; H<M<int> > C; template <typename T> void P(M<T> a); void test() { P(C()); // Problem on P } The problem goes away when H<M<int> > C; is replaced by G<F<M<int> > > C; or when M<int> operator()(); is moved from G to H.