Community
Participate
Working Groups
Build Identifier: 20110615-0604 The parser seems to fail inferring the type of an explicitly specialized template of a function, when the type is used as the result type (does not happen when it's used for a parameter of the function). It does work (not display the error) when explicitly specifying the type like so: template< typename T > T f(); template<> int f<int>() { //< explicit <int> here makes it work return 0; } Reproducible: Always Steps to Reproduce: 1. Create new empty C++ project. 2. Create new empty source file. 3. Insert the following code: template< typename T > T f(); template<> int f() { //< Symbol 'f' could not be resolved return 0; }
Added testcase and fix.
*** cdt git genie on behalf of Markus Schorn *** Bug 355304: Argument deduction for explicit function template specialization. [*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=64c383952a35d928fb255b903e798cadedba2f63