Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333256 - Parser gives errors about symbols in late-specified return type
Summary: Parser gives errors about symbols in late-specified return type
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: Project Inbox CLA
QA Contact: Markus Schorn CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-27 23:52 EST by Nathan Ridge CLA
Modified: 2011-01-07 08:23 EST (History)
1 user (show)

See Also:


Attachments
testcase + fix (4.45 KB, patch)
2011-01-07 07:34 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-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.