-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Server Programmability
when generating the constructor.
Generates code looks like this:
SetClusterParameterCoordinatorDocument::SetClusterParameterCoordinatorDocument(mongo::BSONObj parameter) : _parameter(std::move(parameter)), _hasParameter(true) { // Used for initialization only }
Instead of
_parameter(std::move(parameter))
consider doing this instead:
_parameter(parameter.getOwned())
- is related to
-
SERVER-51846 IDL parser should create owned copy of BSONObj subobjects
- Backlog
-
SERVER-59841 Consider whether ownership should be enforced by the IDL for owned types
- Backlog