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.
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 '->*'
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())
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