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.
Created attachment 151437 [details] a screen shot of the generated code. Basically the bug is that the automatically generated `C operator/(const C& c) const` method delegates to `C& operator*()` instead of `C& operator/()`. If you need more details at this point, here they are. To reproduce this bug, start netbeans and create a new project by going to file->new. select c/c++ from the left "categories" box and then pick c/c++ application from the right "projects" box. In the next window pick a name for the project and then hit the "finish" button. Now that you have created a project, go to File->New File. Select c++ from the left "categories" box and then pick c++ header file from the right "File Types" box. Then press the "next" button, give the file any name and press the "Finish" button. Add the following code the file: class C { private: int x; }; It is important that your class have a member (this is why we have the "int x;" line above). Now click your mouse so that your cursor is anywhere between the curly brackets and click on "Source->Insert code...". A context menu will open at the location of your cursor. Click on "Arithmetic Operators...". A window will appear. In that window, click the checkbox next to "operator/(const C& right) const : C". Then press the "Generate" button.
same bug in operator%() case
fixed, change set: http://hg.netbeans.org/cnd-main/rev/8d154d2c57a9
Integrated into 'main-silver', will be available in build *201501130001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/8d154d2c57a9 User: Alexander Simon <alexvsimon@netbeans.org> Log: fixed Bug #249728 automatically generated division operator (operator/) multiplies instead of divides.