This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 158905

Summary: Errors in resolving of friend templates
Product: cnd Reporter: nnnnnk <nnnnnk>
Component: Code ModelAssignee: nnnnnk <nnnnnk>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: Sun   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description nnnnnk 2009-02-20 16:41:16 UTC
Example:
template <class T>
struct B;

class A {
    int i;
    friend struct B<int>;
};


template <class T>
struct B {
    void foo() {
        A a;
        a.i++; // should be unresolved !!!
    }
};

template <>
struct B<int> {
    void foo() {
        A a;
        a.i++; // unresolved
    }
};

int main() {
    B<char> b;
    b.foo();
    B<int> b2;
    b2.foo();

    return 0;
}
Comment 1 nnnnnk 2009-03-03 12:26:14 UTC
Less than 20 unresolved ids on Boost 
Comment 2 Alexander Simon 2011-04-27 13:22:25 UTC
escalate because issue has vote