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

Bug 333256

Summary: Parser gives errors about symbols in late-specified return type
Product: [Tools] CDT Reporter: Nathan Ridge <zeratul976>
Component: cdt-parserAssignee: Project Inbox <cdt-parser-inbox>
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-27 23:52:16 EST
For the following code:

template <typename T, typename U>
auto add(T t, U u) -> decltype(t + u)  // ERRORS HERE
{
    return t + u;
}

the parser gives errors for the symbols t and u in the decltype:

- Symbol 'u' could not be resolved
- Symbol 't' could not be resolved

This is valid C++0x code.
Comment 1 Markus Schorn CLA 2011-01-07 07:34:50 EST
Created attachment 186265 [details]
testcase + fix
Comment 2 Markus Schorn CLA 2011-01-07 07:37:29 EST
Fixed in 8.0 > 20110107.