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 151600

Summary: Unresolved protected class members in templated friend function
Product: cnd Reporter: nnnnnk <nnnnnk>
Component: Code ModelAssignee: issues@cnd <issues>
Status: RESOLVED WORKSFORME    
Severity: blocker    
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description nnnnnk 2008-10-28 14:52:47 UTC
Example:
class C
{
protected:
    int i;
    friend void foo();
    template <class T> friend void tfoo();
};
void foo()
{
    C c;
    c.i = 1; // ok
}
template<class T>
static void tfoo()
{
    C c;
    c.i = 1; // unresolved
}

int main() {
    foo();
    tfoo<int>();
    return 0;
}
Comment 1 Alexey Vladykin 2009-03-16 17:08:08 UTC
Works now. Several template friend bugs have been fixed recently.