Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333325 - Parser does not support function templates with default parameters
Summary: Parser does not support function templates with default parameters
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 8.0   Edit
Hardware: PC Windows Server 2003
: P3 normal (vote)
Target Milestone: 8.0   Edit
Assignee: Markus Schorn CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-29 22:50 EST by Nathan Ridge CLA
Modified: 2011-01-07 09:38 EST (History)
1 user (show)

See Also:


Attachments
testcase + fix (975 bytes, patch)
2011-01-07 08:54 EST, Markus Schorn CLA
mschorn.eclipse: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.