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 - Errors in resolving of friend templates
Summary: Errors in resolving of friend templates
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 6.x
Hardware: Sun All
: P3 blocker with 1 vote (vote)
Assignee: nnnnnk
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-20 16:41 UTC by nnnnnk
Modified: 2011-05-10 17:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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