| Summary: | Incorrect "Member declaration not found" in template class | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | Geoff Alexander <gdlxn> | ||||
| Component: | cdt-parser | Assignee: | Markus Schorn <mschorn.eclipse> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Markus Schorn <mschorn.eclipse> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdtdoug, gdlxn | ||||
| Version: | 8.0 | ||||||
| Target Milestone: | 8.0.2 | ||||||
| Hardware: | PC | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Thanks, the example can be simplified to:
// a.h
template<class T> struct C1 {
typedef int iterator;
iterator m1();
};
// a.cpp
template<class T> typename C1<T>::iterator C1<T>::m1() {
return 0;
}
Added testcase and fix. *** cdt git genie on behalf of Markus Schorn ***
Bug 357320: Class template usage in method definded outside of class body.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=b9e57bcf8c1aa970a02e72c7dc9d566de6854ee1
*** cdt git genie on behalf of Markus Schorn ***
Bug 357320: Class template usage in method defined outside of class body.
[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=1772ed2b5581051baa97510429a0719d3ca51cec
|
Created attachment 203119 [details] Eclipse workspace containing small example illustrating the problem I've attached an Eclipse workspace containing a small example illustrating the problem. In this example, the template class C1 compiles just fine. However, CDT is incorrectly reporting a "Member declaration not found": Description Resource Path Location Type Member declaration not found C1.tpl /Example/include line 5 Semantic Error