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 84121 - Code Completion and pointer-to-member
Summary: Code Completion and pointer-to-member
Status: RESOLVED WONTFIX
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Completion (show other bugs)
Version: 5.x
Hardware: All All
: P4 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-04 12:13 UTC by soldatov
Modified: 2009-12-21 05:29 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 soldatov 2006-09-04 12:13:47 UTC
Create this program:

--------------------------------------------------
class sample{
  public:
    int One(int arg) {return(arg+1);}
    int Two(int arg) {return(arg+2);}
};

int main(int argc, char **argv){
    int (sample::*funcPtr)(int) = &sample::One;
    sample s;
    int result =(s.*funcPtr)(2);
    
    return 0;
}

--------------------------------------------------
1) If I type "sample::" then code completion listbox doesn't appear
2) funcPtr is missed in 'Class View' and 'Code Completion listbox'
3) 'Code Completion listbox' doesn't assist when I use '.*' and '->*'
Comment 1 Vladimir Voskresensky 2006-10-31 14:33:42 UTC
This is very specific behavior (rarely used) of pointer-to-member C++ feature.
I downgrade and remove CND1-FCS from whiteboard status
Some explanations:

problem 1):
- is valid only for the second "::" (&sample::One) when CC is smart enough to
detect local variable declaration as pointer to class function
in all other cases class sample doesn't have any static members => sample::
doesn't have alternatives

problem 2)
- not a problem for ClassView, because funcPtr is local variable and shouldn't
be in ClassView
- "funcPtr" presents in Code Completion

problem 3)
- the same as 1) + it doens't work in VS as well (VS gives incorrect One() and
Two())
Comment 2 Quality Engineering 2009-12-21 05:29:09 UTC
This bug was reported against NetBeans IDE 6.0 or an older release, or against a non-maintained module. NetBeans team does not have enough resources to get to this issue, therefore we are closing the issue as a WONTFIX. If you are interested in providing a patch for this bug, please see our NetFIX guidelines for how to proceed. 

We apologize for any inconvenience.


Thank you.
The NetBeans Team