Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333325

Summary: Parser does not support function templates with default parameters
Product: [Tools] CDT Reporter: Nathan Ridge <zeratul976>
Component: cdt-parserAssignee: 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: PC   
OS: Windows Server 2003   
Whiteboard:
Attachments:
Description Flags
testcase + fix mschorn.eclipse: iplog-

Description Nathan Ridge CLA 2010-12-29 22:50:48 EST
For the following code:

template <typename T, typename U = int>
void f()
{
}
void g()
{
    f<int>();  // ERROR HERE
}

the parser gives an error: "Symbol f could not be resolved."

Default parameters in function templates are valid in C++0x and have been supported by gcc since version 4.4
Comment 1 Markus Schorn CLA 2011-01-07 08:54:50 EST
Created attachment 186270 [details]
testcase + fix
Comment 2 Markus Schorn CLA 2011-01-07 08:56:36 EST
Fixed in 8.0 > 20110107.