Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-70706

Coverity analysis defect 133999: Move constructor without move assignment

    • Fully Compatible
    • QO 2022-11-14

      Copy without assign

      This class has a user-defined copy constructor but no user-defined assignment operator. If the copy constructor is necessary to manage owned resources then a corresponding assignment operator is usually required. If an object of this type is assigned memory leaks and/or use-after-free errors may occur. Note that a compiler-generated assignment operator will perform only a bit-wise copy for any fields that do not have their own assignment operators defined. Class has user-written copy constructor but no user-written assignment operator
      /src/mongo/db/query/optimizer/cascades/memo_defs.h:56: COPY_WITHOUT_ASSIGN 133999 Class "mongo::optimizer::cascades::OrderPreservingABTSet" has a user-written copy constructor "mongo::optimizer::cascades::OrderPreservingABTSet::OrderPreservingABTSet(mongo::optimizer::cascades::OrderPreservingABTSet const &) =delete" but no corresponding user-written assignment operator.
      /src/mongo/db/query/optimizer/cascades/memo_defs.h:59: COPY_WITHOUT_ASSIGN 133999 User-written copy constructor.

            Assignee:
            svilen.mihaylov@mongodb.com Svilen Mihaylov (Inactive)
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: