[clazy] [Bug 403193] New: rule-of-three warns when it should not

Albert Astals Cid bugzilla_noreply at kde.org
Sun Jan 13 22:48:17 GMT 2019


https://bugs.kde.org/show_bug.cgi?id=403193

            Bug ID: 403193
           Summary: rule-of-three warns when it should not
           Product: clazy
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: unassigned-bugs at kde.org
          Reporter: aacid at kde.org
                CC: smartins at kde.org
  Target Milestone: ---

Created attachment 117449
  --> https://bugs.kde.org/attachment.cgi?id=117449&action=edit
Said file

The attached code complains with 
   A has dtor, copy-ctor but not copy-assignment [-Wclazy-rule-of-three]

But the  when trying to use the copy-assignment you get

‘A& A::operator=(const A&)’ is implicitly deleted because the default
definition would be ill-formed:
 class A
       ^
main.cpp:8:7: error: non-static const member ‘APrivate* const A::d’, can’t use
default assignment operator


So clazy should not warn?

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Unassigned-bugs mailing list