diff options
Diffstat (limited to 'src/mongo/db/commands')
19 files changed, 48 insertions, 50 deletions
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp index 1808f7022ea..22b6a1326a4 100644 --- a/src/mongo/db/commands/authentication_commands.cpp +++ b/src/mongo/db/commands/authentication_commands.cpp @@ -33,6 +33,7 @@ #include "mongo/db/commands/authentication_commands.h" +#include <memory> #include <string> #include <vector> @@ -54,7 +55,6 @@ #include "mongo/platform/random.h" #include "mongo/rpc/metadata/client_metadata.h" #include "mongo/rpc/metadata/client_metadata_ismaster.h" -#include "mongo/stdx/memory.h" #include "mongo/transport/session.h" #include "mongo/util/concurrency/mutex.h" #include "mongo/util/log.h" diff --git a/src/mongo/db/commands/clone_collection.cpp b/src/mongo/db/commands/clone_collection.cpp index b0eeddefe5b..5fa66f56b23 100644 --- a/src/mongo/db/commands/clone_collection.cpp +++ b/src/mongo/db/commands/clone_collection.cpp @@ -155,7 +155,7 @@ public: << " query: " << redact(query) << " " << (copyIndexes ? "" : ", not copying indexes"); Cloner cloner; - auto myconn = stdx::make_unique<DBClientConnection>(); + auto myconn = std::make_unique<DBClientConnection>(); if (!myconn->connect(HostAndPort(fromhost), StringData(), errmsg)) return false; diff --git a/src/mongo/db/commands/dbcheck.cpp b/src/mongo/db/commands/dbcheck.cpp index 3a4cb290a8f..5f58079b200 100644 --- a/src/mongo/db/commands/dbcheck.cpp +++ b/src/mongo/db/commands/dbcheck.cpp @@ -118,7 +118,7 @@ std::unique_ptr<DbCheckRun> singleCollectionRun(OperationContext* opCtx, auto maxSize = invocation.getMaxSize(); auto maxRate = invocation.getMaxCountPerSecond(); auto info = DbCheckCollectionInfo{nss, start, end, maxCount, maxSize, maxRate}; - auto result = stdx::make_unique<DbCheckRun>(); + auto result = std::make_unique<DbCheckRun>(); result->push_back(info); return result; } @@ -132,7 +132,7 @@ std::unique_ptr<DbCheckRun> fullDatabaseRun(OperationContext* opCtx, // Read the list of collections in a database-level lock. AutoGetDb agd(opCtx, StringData(dbName), MODE_S); auto db = agd.getDb(); - auto result = stdx::make_unique<DbCheckRun>(); + auto result = std::make_unique<DbCheckRun>(); uassert(ErrorCodes::NamespaceNotFound, "Database " + dbName + " not found", agd.getDb()); diff --git a/src/mongo/db/commands/dbcommands_d.cpp b/src/mongo/db/commands/dbcommands_d.cpp index 5bede2d66f6..2681ed180b2 100644 --- a/src/mongo/db/commands/dbcommands_d.cpp +++ b/src/mongo/db/commands/dbcommands_d.cpp @@ -216,7 +216,7 @@ public: BSONObj sort = BSON("files_id" << 1 << "n" << 1); return writeConflictRetry(opCtx, "filemd5", dbname, [&] { - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(query); qr->setSort(sort); diff --git a/src/mongo/db/commands/distinct.cpp b/src/mongo/db/commands/distinct.cpp index 9372f78efd0..e31a0843f2c 100644 --- a/src/mongo/db/commands/distinct.cpp +++ b/src/mongo/db/commands/distinct.cpp @@ -31,6 +31,7 @@ #include "mongo/platform/basic.h" +#include <memory> #include <string> #include <vector> @@ -56,7 +57,6 @@ #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/transaction_participant.h" #include "mongo/db/views/resolved_view.h" -#include "mongo/stdx/memory.h" #include "mongo/util/log.h" namespace mongo { diff --git a/src/mongo/db/commands/explain_cmd.cpp b/src/mongo/db/commands/explain_cmd.cpp index 6a8c49f3e20..5f6f034f4d2 100644 --- a/src/mongo/db/commands/explain_cmd.cpp +++ b/src/mongo/db/commands/explain_cmd.cpp @@ -163,9 +163,9 @@ std::unique_ptr<CommandInvocation> CmdExplain::parse(OperationContext* opCtx, << explainedObj.firstElementFieldName(), explainedCommand); auto innerRequest = - stdx::make_unique<OpMsgRequest>(OpMsgRequest::fromDBAndBody(dbname, explainedObj)); + std::make_unique<OpMsgRequest>(OpMsgRequest::fromDBAndBody(dbname, explainedObj)); auto innerInvocation = explainedCommand->parse(opCtx, *innerRequest); - return stdx::make_unique<Invocation>( + return std::make_unique<Invocation>( this, request, std::move(verbosity), std::move(innerRequest), std::move(innerInvocation)); } diff --git a/src/mongo/db/commands/fsync.cpp b/src/mongo/db/commands/fsync.cpp index 37b0bae2cf8..7bb1aa48ae5 100644 --- a/src/mongo/db/commands/fsync.cpp +++ b/src/mongo/db/commands/fsync.cpp @@ -169,7 +169,7 @@ public: stdx::unique_lock<stdx::mutex> lk(lockStateMutex); threadStatus = Status::OK(); threadStarted = false; - _lockThread = stdx::make_unique<FSyncLockThread>(allowFsyncFailure); + _lockThread = std::make_unique<FSyncLockThread>(allowFsyncFailure); _lockThread->go(); while (!threadStarted && threadStatus.isOK()) { diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp index 60f3436deb6..3e0fadf592e 100644 --- a/src/mongo/db/commands/getmore_cmd.cpp +++ b/src/mongo/db/commands/getmore_cmd.cpp @@ -58,7 +58,6 @@ #include "mongo/db/stats/counters.h" #include "mongo/db/stats/top.h" #include "mongo/s/chunk_version.h" -#include "mongo/stdx/memory.h" #include "mongo/util/fail_point_service.h" #include "mongo/util/log.h" #include "mongo/util/scopeguard.h" diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp index f7be9462caa..6df4e890028 100644 --- a/src/mongo/db/commands/index_filter_commands.cpp +++ b/src/mongo/db/commands/index_filter_commands.cpp @@ -303,7 +303,7 @@ Status ClearFilters::clear(OperationContext* opCtx, AllowedIndexEntry entry = *i; // Create canonical query. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(entry.query); qr->setSort(entry.sort); qr->setProj(entry.projection); diff --git a/src/mongo/db/commands/index_filter_commands_test.cpp b/src/mongo/db/commands/index_filter_commands_test.cpp index 4a839f4b1ab..d5e50185954 100644 --- a/src/mongo/db/commands/index_filter_commands_test.cpp +++ b/src/mongo/db/commands/index_filter_commands_test.cpp @@ -33,13 +33,14 @@ #include "mongo/db/commands/index_filter_commands.h" +#include <memory> + #include "mongo/db/json.h" #include "mongo/db/operation_context_noop.h" #include "mongo/db/query/collation/collator_interface_mock.h" #include "mongo/db/query/plan_ranker.h" #include "mongo/db/query/query_solution.h" #include "mongo/db/query/query_test_service_context.h" -#include "mongo/stdx/memory.h" #include "mongo/unittest/unittest.h" using namespace mongo; @@ -108,7 +109,7 @@ std::unique_ptr<PlanRankingDecision> createDecision(size_t numPlans) { unique_ptr<PlanRankingDecision> why(new PlanRankingDecision()); for (size_t i = 0; i < numPlans; ++i) { CommonStats common("COLLSCAN"); - auto stats = stdx::make_unique<PlanStageStats>(common, STAGE_COLLSCAN); + auto stats = std::make_unique<PlanStageStats>(common, STAGE_COLLSCAN); stats->specific.reset(new CollectionScanStats()); why->stats.push_back(std::move(stats)); why->scores.push_back(0U); @@ -127,7 +128,7 @@ void addQueryShapeToPlanCache(OperationContext* opCtx, const char* projectionStr, const char* collationStr) { // Create canonical query. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson(queryStr)); qr->setSort(fromjson(sortStr)); qr->setProj(fromjson(projectionStr)); @@ -158,7 +159,7 @@ bool planCacheContains(OperationContext* opCtx, const char* collationStr) { // Create canonical query. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson(queryStr)); qr->setSort(fromjson(sortStr)); qr->setProj(fromjson(projectionStr)); @@ -176,7 +177,7 @@ bool planCacheContains(OperationContext* opCtx, // Canonicalizing query shape in cache entry to get cache key. // Alternatively, we could add key to PlanCacheEntry but that would be used in one place // only. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(entry->query); qr->setSort(entry->sort); qr->setProj(entry->projection); diff --git a/src/mongo/db/commands/list_collections.cpp b/src/mongo/db/commands/list_collections.cpp index 9c5ddbaab52..5c116d3a500 100644 --- a/src/mongo/db/commands/list_collections.cpp +++ b/src/mongo/db/commands/list_collections.cpp @@ -29,6 +29,7 @@ #include "mongo/platform/basic.h" +#include <memory> #include <vector> #include "mongo/base/checked_cast.h" @@ -59,7 +60,6 @@ #include "mongo/db/storage/storage_engine.h" #include "mongo/db/storage/storage_options.h" #include "mongo/db/views/view_catalog.h" -#include "mongo/stdx/memory.h" namespace mongo { @@ -67,7 +67,6 @@ using std::string; using std::stringstream; using std::unique_ptr; using std::vector; -using stdx::make_unique; namespace { @@ -294,8 +293,8 @@ public: false, cursorNss); - auto ws = make_unique<WorkingSet>(); - auto root = make_unique<QueuedDataStage>(opCtx, ws.get()); + auto ws = std::make_unique<WorkingSet>(); + auto root = std::make_unique<QueuedDataStage>(opCtx, ws.get()); if (db) { if (auto collNames = _getExactNameMatches(matcher.get())) { diff --git a/src/mongo/db/commands/list_indexes.cpp b/src/mongo/db/commands/list_indexes.cpp index dac2a6197b6..bb0b394b273 100644 --- a/src/mongo/db/commands/list_indexes.cpp +++ b/src/mongo/db/commands/list_indexes.cpp @@ -29,6 +29,8 @@ #include "mongo/platform/basic.h" +#include <memory> + #include "mongo/bson/bsonobjbuilder.h" #include "mongo/db/auth/authorization_session.h" #include "mongo/db/catalog/collection_catalog_entry.h" @@ -47,7 +49,6 @@ #include "mongo/db/query/find_common.h" #include "mongo/db/service_context.h" #include "mongo/db/storage/storage_engine.h" -#include "mongo/stdx/memory.h" #include "mongo/util/uuid.h" namespace mongo { @@ -56,7 +57,6 @@ using std::string; using std::stringstream; using std::unique_ptr; using std::vector; -using stdx::make_unique; namespace { @@ -168,8 +168,8 @@ public: cce->getAllIndexes(opCtx, &indexNames); }); - auto ws = make_unique<WorkingSet>(); - auto root = make_unique<QueuedDataStage>(opCtx, ws.get()); + auto ws = std::make_unique<WorkingSet>(); + auto root = std::make_unique<QueuedDataStage>(opCtx, ws.get()); for (size_t i = 0; i < indexNames.size(); i++) { auto indexSpec = writeConflictRetry(opCtx, "listIndexes", nss.ns(), [&] { diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index fb811ddc370..f936129a526 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -1197,7 +1197,7 @@ void State::finalReduce(OperationContext* opCtx, CurOp* curOp) { const ExtensionsCallbackReal extensionsCallback(_opCtx, &_config.incLong); - auto qr = stdx::make_unique<QueryRequest>(_config.incLong); + auto qr = std::make_unique<QueryRequest>(_config.incLong); qr->setSort(sortKey); const boost::intrusive_ptr<ExpressionContext> expCtx; @@ -1518,7 +1518,7 @@ public: opCtx, config.nss)); } - auto qr = stdx::make_unique<QueryRequest>(config.nss); + auto qr = std::make_unique<QueryRequest>(config.nss); qr->setFilter(config.filter); qr->setSort(config.sort); qr->setCollation(config.collation); diff --git a/src/mongo/db/commands/mr_test.cpp b/src/mongo/db/commands/mr_test.cpp index 615cd5f3c9f..f2a580730fb 100644 --- a/src/mongo/db/commands/mr_test.cpp +++ b/src/mongo/db/commands/mr_test.cpp @@ -405,7 +405,7 @@ void MapReduceCommandTest::setUp() { repl::DropPendingCollectionReaper::set( service, - stdx::make_unique<repl::DropPendingCollectionReaper>(repl::StorageInterface::get(service))); + std::make_unique<repl::DropPendingCollectionReaper>(repl::StorageInterface::get(service))); // Set up an OpObserver to track the temporary collections mapReduce creates. auto opObserver = std::make_unique<MapReduceOpObserver>(); diff --git a/src/mongo/db/commands/plan_cache_commands.cpp b/src/mongo/db/commands/plan_cache_commands.cpp index 48655efde08..6a89ca96bdf 100644 --- a/src/mongo/db/commands/plan_cache_commands.cpp +++ b/src/mongo/db/commands/plan_cache_commands.cpp @@ -200,7 +200,7 @@ StatusWith<unique_ptr<CanonicalQuery>> PlanCacheCommand::canonicalize(OperationC // Create canonical query const NamespaceString nss(ns); - auto qr = stdx::make_unique<QueryRequest>(std::move(nss)); + auto qr = std::make_unique<QueryRequest>(std::move(nss)); qr->setFilter(queryObj); qr->setSort(sortObj); qr->setProj(projObj); diff --git a/src/mongo/db/commands/plan_cache_commands_test.cpp b/src/mongo/db/commands/plan_cache_commands_test.cpp index 08cd42ae9af..517e1defa15 100644 --- a/src/mongo/db/commands/plan_cache_commands_test.cpp +++ b/src/mongo/db/commands/plan_cache_commands_test.cpp @@ -34,13 +34,13 @@ #include "mongo/db/commands/plan_cache_commands.h" #include <algorithm> +#include <memory> #include "mongo/db/json.h" #include "mongo/db/operation_context_noop.h" #include "mongo/db/query/plan_ranker.h" #include "mongo/db/query/query_solution.h" #include "mongo/db/query/query_test_service_context.h" -#include "mongo/stdx/memory.h" #include "mongo/unittest/unittest.h" #include "mongo/util/str.h" @@ -117,7 +117,7 @@ std::unique_ptr<PlanRankingDecision> createDecision(size_t numPlans, size_t work unique_ptr<PlanRankingDecision> why(new PlanRankingDecision()); for (size_t i = 0; i < numPlans; ++i) { CommonStats common("COLLSCAN"); - auto stats = stdx::make_unique<PlanStageStats>(common, STAGE_COLLSCAN); + auto stats = std::make_unique<PlanStageStats>(common, STAGE_COLLSCAN); stats->specific.reset(new CollectionScanStats()); why->stats.push_back(std::move(stats)); why->stats[i]->common.works = works; @@ -138,7 +138,7 @@ TEST(PlanCacheCommandsTest, planCacheListQueryShapesOneKey) { auto opCtx = serviceContext.makeOperationContext(); // Create a canonical query - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 1}")); qr->setSort(fromjson("{a: -1}")); qr->setProj(fromjson("{_id: 0}")); @@ -175,7 +175,7 @@ TEST(PlanCacheCommandsTest, planCacheClearAllShapes) { auto opCtx = serviceContext.makeOperationContext(); // Create a canonical query - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 1}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx.get(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); @@ -312,11 +312,11 @@ TEST(PlanCacheCommandsTest, planCacheClearOneKey) { auto opCtx = serviceContext.makeOperationContext(); // Create 2 canonical queries. - auto qrA = stdx::make_unique<QueryRequest>(nss); + auto qrA = std::make_unique<QueryRequest>(nss); qrA->setFilter(fromjson("{a: 1}")); auto statusWithCQA = CanonicalQuery::canonicalize(opCtx.get(), std::move(qrA)); ASSERT_OK(statusWithCQA.getStatus()); - auto qrB = stdx::make_unique<QueryRequest>(nss); + auto qrB = std::make_unique<QueryRequest>(nss); qrB->setFilter(fromjson("{b: 1}")); unique_ptr<CanonicalQuery> cqA = std::move(statusWithCQA.getValue()); auto statusWithCQB = CanonicalQuery::canonicalize(opCtx.get(), std::move(qrB)); @@ -374,12 +374,12 @@ TEST(PlanCacheCommandsTest, planCacheClearOneKeyCollation) { auto opCtx = serviceContext.makeOperationContext(); // Create 2 canonical queries, one with collation. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 'foo'}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx.get(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue()); - auto qrCollation = stdx::make_unique<QueryRequest>(nss); + auto qrCollation = std::make_unique<QueryRequest>(nss); qrCollation->setFilter(fromjson("{a: 'foo'}")); qrCollation->setCollation(fromjson("{locale: 'mock_reverse_string'}")); auto statusWithCQCollation = CanonicalQuery::canonicalize(opCtx.get(), std::move(qrCollation)); @@ -555,7 +555,7 @@ TEST(PlanCacheCommandsTest, planCacheListPlansOnlyOneSolutionTrue) { auto opCtx = serviceContext.makeOperationContext(); // Create a canonical query - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 1}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx.get(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); @@ -588,7 +588,7 @@ TEST(PlanCacheCommandsTest, planCacheListPlansOnlyOneSolutionFalse) { auto opCtx = serviceContext.makeOperationContext(); // Create a canonical query - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 1}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx.get(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); @@ -624,12 +624,12 @@ TEST(PlanCacheCommandsTest, planCacheListPlansCollation) { auto opCtx = serviceContext.makeOperationContext(); // Create 2 canonical queries, one with collation. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 'foo'}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx.get(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); unique_ptr<CanonicalQuery> cq = std::move(statusWithCQ.getValue()); - auto qrCollation = stdx::make_unique<QueryRequest>(nss); + auto qrCollation = std::make_unique<QueryRequest>(nss); qrCollation->setFilter(fromjson("{a: 'foo'}")); qrCollation->setCollation(fromjson("{locale: 'mock_reverse_string'}")); auto statusWithCQCollation = CanonicalQuery::canonicalize(opCtx.get(), std::move(qrCollation)); @@ -684,7 +684,7 @@ TEST(PlanCacheCommandsTest, planCacheListPlansTimeOfCreationIsCorrect) { auto opCtx = serviceContext.makeOperationContext(); // Create a canonical query. - auto qr = stdx::make_unique<QueryRequest>(nss); + auto qr = std::make_unique<QueryRequest>(nss); qr->setFilter(fromjson("{a: 1}")); auto statusWithCQ = CanonicalQuery::canonicalize(opCtx.get(), std::move(qr)); ASSERT_OK(statusWithCQ.getStatus()); diff --git a/src/mongo/db/commands/run_aggregate.cpp b/src/mongo/db/commands/run_aggregate.cpp index 8c1be73e152..b866688ce21 100644 --- a/src/mongo/db/commands/run_aggregate.cpp +++ b/src/mongo/db/commands/run_aggregate.cpp @@ -34,6 +34,7 @@ #include "mongo/db/commands/run_aggregate.h" #include <boost/optional.hpp> +#include <memory> #include <vector> #include "mongo/db/auth/authorization_session.h" @@ -71,7 +72,6 @@ #include "mongo/db/transaction_participant.h" #include "mongo/db/views/view.h" #include "mongo/db/views/view_catalog.h" -#include "mongo/stdx/memory.h" #include "mongo/util/log.h" #include "mongo/util/scopeguard.h" #include "mongo/util/string_map.h" @@ -84,7 +84,6 @@ using std::shared_ptr; using std::string; using std::stringstream; using std::unique_ptr; -using stdx::make_unique; namespace { /** @@ -475,10 +474,10 @@ std::unique_ptr<PlanExecutor, PlanExecutor::Deleter> createOuterPipelineProxyExe std::unique_ptr<Pipeline, PipelineDeleter> pipeline, bool hasChangeStream) { // Transfer ownership of the Pipeline to the PipelineProxyStage. - auto ws = make_unique<WorkingSet>(); + auto ws = std::make_unique<WorkingSet>(); auto proxy = hasChangeStream - ? make_unique<ChangeStreamProxyStage>(opCtx, std::move(pipeline), ws.get()) - : make_unique<PipelineProxyStage>(opCtx, std::move(pipeline), ws.get()); + ? std::make_unique<ChangeStreamProxyStage>(opCtx, std::move(pipeline), ws.get()) + : std::make_unique<PipelineProxyStage>(opCtx, std::move(pipeline), ws.get()); // This PlanExecutor will simply forward requests to the Pipeline, so does not need // to yield or to be registered with any collection's CursorManager to receive diff --git a/src/mongo/db/commands/write_commands/write_commands.cpp b/src/mongo/db/commands/write_commands/write_commands.cpp index c2892e08fd9..156263192df 100644 --- a/src/mongo/db/commands/write_commands/write_commands.cpp +++ b/src/mongo/db/commands/write_commands/write_commands.cpp @@ -312,7 +312,7 @@ private: std::unique_ptr<CommandInvocation> parse(OperationContext*, const OpMsgRequest& request) override { - return stdx::make_unique<Invocation>(this, request); + return std::make_unique<Invocation>(this, request); } void snipForLogging(mutablebson::Document* cmdObj) const final { @@ -393,7 +393,7 @@ private: }; std::unique_ptr<CommandInvocation> parse(OperationContext*, const OpMsgRequest& request) { - return stdx::make_unique<Invocation>(this, request); + return std::make_unique<Invocation>(this, request); } void snipForLogging(mutablebson::Document* cmdObj) const final { @@ -468,7 +468,7 @@ private: std::unique_ptr<CommandInvocation> parse(OperationContext*, const OpMsgRequest& request) override { - return stdx::make_unique<Invocation>(this, request); + return std::make_unique<Invocation>(this, request); } void snipForLogging(mutablebson::Document* cmdObj) const final { diff --git a/src/mongo/db/commands/write_commands/write_commands_common.cpp b/src/mongo/db/commands/write_commands/write_commands_common.cpp index e599cd47a2f..9e449e19b79 100644 --- a/src/mongo/db/commands/write_commands/write_commands_common.cpp +++ b/src/mongo/db/commands/write_commands/write_commands_common.cpp @@ -32,6 +32,7 @@ #include "mongo/db/commands/write_commands/write_commands_common.h" #include <algorithm> +#include <memory> #include <string> #include <vector> @@ -40,7 +41,6 @@ #include "mongo/db/auth/privilege.h" #include "mongo/db/catalog/document_validation.h" #include "mongo/db/ops/write_ops.h" -#include "mongo/stdx/memory.h" #include "mongo/util/assert_util.h" namespace mongo { |