Bug 71410 - [SymbolTable] lookup fails for a nested type that inherits from a template parameter
Summary: [SymbolTable] lookup fails for a nested type that inherits from a template pa...
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-parser (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 2.0.1   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-08-04 15:23 EDT by Victor Lenet CLA
Modified: 2014-01-29 10:39 EST (History)
1 user (show)

See Also:


Attachments
Fix for the problem (939 bytes, patch)
2004-08-04 15:36 EDT, Victor Lenet CLA
cdtdoug: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Lenet CLA 2004-08-04 15:23:52 EDT
Origin:
C/C++ Indexer Problem: Syntax error encountered in 
file: /usr/include/c++/3.3.1/bits/basic_string.h on line: 253.

The problem is manifested by the following piece of code:

template <typename T, typename U>
class A {
    struct B : U {
        T* mpT;
    };
    B b;

    T* foo(T* p) {
        return (b.mpT = p);
};                    ^^^  

The actual problem is a lookup for T inside of B. When checking parents (U) a 
ParserSymbolTableException is thrown because a parent is a template parameter.
Comment 1 Victor Lenet CLA 2004-08-04 15:36:11 EDT
Created attachment 13759 [details]
Fix for the problem
Comment 2 Andrew Niefer CLA 2004-08-10 15:35:59 EDT
fixed in head and branch