-
Type: Improvement
-
Resolution: Duplicate
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: Internal Code
-
QO 2022-08-08
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/ce/array_histogram.h:36: COPY_WITHOUT_ASSIGN 122540 Class "mongo::ce::ArrayHistogram" has a user-written copy constructor "mongo::ce::ArrayHistogram::ArrayHistogram(mongo::ce::ArrayHistogram const &) =delete" but no corresponding user-written assignment operator.
/src/mongo/db/query/ce/array_histogram.h:52: COPY_WITHOUT_ASSIGN 122540 User-written copy constructor.
- depends on
-
SERVER-67497 Refactor the hist-ce prototype to separate estimation logic from histograms
- Closed
- is caused by
-
SERVER-66957 Histogram-based CE for SargableNodes based on the CE prototype
- Closed
-
SERVER-67497 Refactor the hist-ce prototype to separate estimation logic from histograms
- Closed