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

            Bug ID: 377858
           Summary: False warnings about missing explicit with move
                    constructors
           Product: krazy
           Version: unspecified
          Platform: Other
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: win...@kde.org
          Reporter: kosse...@kde.org
  Target Milestone: ---

The [explicit] check currently wants move constructors to be declared
"explicit". Which might run against recommended practices?

I am only still learning since recently about move constructors, but if I
understood correctly move constructors should have the same handling as the
copy constructors they overload with together, as some template algorithms
expect this now and then, so the only decision is by lvalue vs. rvalue and not
due to different explicit declarations.

Example for false negative on move constructor:

Krazy result listed at
http://ebn.kde.org/krazy/reports/extragear/kdevelop/kdevplatform/
has for item "10. Check for C++ ctors that should be declared 'explicit'
[explicit]...OOPS! 14 issues found!"
as first hit
    plugins/outlineview/outlinenode.h: line# 43 (1) 
which is
    OutlineNode(OutlineNode&& other) Q_DECL_NOEXCEPT;
https://lxr.kde.org/source/extragear/kdevelop/kdevplatform/plugins/outlineview/outlinenode.h#0043

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to