summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2019-06-10 01:18:23 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-06-10 01:18:23 -0400
commitc9548e729c8fecd9d7a9a5dd341da0433194ac73 (patch)
tree37b05114182d8a7787c0b39aa71b0ec381292e85 /src/mongo/db/commands
parentc43636652fc4fb69a47f4eaaa767bc57bb59bb5f (diff)
downloadmongo-c9548e729c8fecd9d7a9a5dd341da0433194ac73.tar.gz
SERVER-39338 Remove `stdx/functional.h`
Diffstat (limited to 'src/mongo/db/commands')
-rw-r--r--src/mongo/db/commands/feature_compatibility_version.h2
-rw-r--r--src/mongo/db/commands/fsync_locked.cpp6
-rw-r--r--src/mongo/db/commands/fsync_locked.h4
-rw-r--r--src/mongo/db/commands/getmore_cmd.cpp4
-rw-r--r--src/mongo/db/commands/set_feature_compatibility_version_command.cpp5
-rw-r--r--src/mongo/db/commands/user_management_commands.cpp4
6 files changed, 13 insertions, 12 deletions
diff --git a/src/mongo/db/commands/feature_compatibility_version.h b/src/mongo/db/commands/feature_compatibility_version.h
index 475243d6233..c6f7a7f97d8 100644
--- a/src/mongo/db/commands/feature_compatibility_version.h
+++ b/src/mongo/db/commands/feature_compatibility_version.h
@@ -109,7 +109,7 @@ private:
/**
* Build update command.
*/
- typedef stdx::function<void(BSONObjBuilder)> UpdateBuilder;
+ typedef std::function<void(BSONObjBuilder)> UpdateBuilder;
static void _runUpdateCommand(OperationContext* opCtx, UpdateBuilder callback);
};
diff --git a/src/mongo/db/commands/fsync_locked.cpp b/src/mongo/db/commands/fsync_locked.cpp
index 7100c06851e..322506aeb5a 100644
--- a/src/mongo/db/commands/fsync_locked.cpp
+++ b/src/mongo/db/commands/fsync_locked.cpp
@@ -27,18 +27,20 @@
* it in the license file.
*/
+#include <functional>
+
#include "mongo/db/commands/fsync_locked.h"
namespace mongo {
namespace {
-stdx::function<bool()> lockedForWritingImpl;
+std::function<bool()> lockedForWritingImpl;
} // namespace
bool lockedForWriting() {
return lockedForWritingImpl();
}
-void setLockedForWritingImpl(stdx::function<bool()> impl) {
+void setLockedForWritingImpl(std::function<bool()> impl) {
lockedForWritingImpl = std::move(impl);
}
} // namespace mongo
diff --git a/src/mongo/db/commands/fsync_locked.h b/src/mongo/db/commands/fsync_locked.h
index a84c03209de..b5d4ccffd09 100644
--- a/src/mongo/db/commands/fsync_locked.h
+++ b/src/mongo/db/commands/fsync_locked.h
@@ -29,7 +29,7 @@
#pragma once
-#include "mongo/stdx/functional.h"
+#include <functional>
namespace mongo {
/**
@@ -41,6 +41,6 @@ bool lockedForWriting();
* Sets the implementation for lockedForWriting(). Should be done once during startup in a
* MONGO_INITIALIZER.
*/
-void setLockedForWritingImpl(stdx::function<bool()> impl);
+void setLockedForWritingImpl(std::function<bool()> impl);
} // namespace mongo
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp
index 4e168c9efe8..60f3436deb6 100644
--- a/src/mongo/db/commands/getmore_cmd.cpp
+++ b/src/mongo/db/commands/getmore_cmd.cpp
@@ -475,7 +475,7 @@ public:
// repeatedly release and re-acquire the collection readLock at regular intervals until
// the failpoint is released. This is done in order to avoid deadlocks caused by the
// pinned-cursor failpoints in this file (see SERVER-21997).
- stdx::function<void()> dropAndReacquireReadLock = [&readLock, opCtx, this]() {
+ std::function<void()> dropAndReacquireReadLock = [&readLock, opCtx, this]() {
// Make sure an interrupted operation does not prevent us from reacquiring the lock.
UninterruptibleLockGuard noInterrupt(opCtx->lockState());
readLock.reset();
@@ -553,7 +553,7 @@ public:
// the 'waitWithPinnedCursorDuringGetMoreBatch' failpoint is active, set the 'msg' field
// of this operation's CurOp to signal that we've hit this point and then spin until the
// failpoint is released.
- stdx::function<void()> saveAndRestoreStateWithReadLockReacquisition =
+ std::function<void()> saveAndRestoreStateWithReadLockReacquisition =
[exec, dropAndReacquireReadLock]() {
exec->saveState();
dropAndReacquireReadLock();
diff --git a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
index 50196ec7aed..bd9b65ddaa0 100644
--- a/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
+++ b/src/mongo/db/commands/set_feature_compatibility_version_command.cpp
@@ -97,9 +97,8 @@ LogicalSessionIdSet getMatchingSessionIdsFromTransactionTable(OperationContext*
void forEachSessionWithCheckout(
OperationContext* opCtx,
LogicalSessionIdSet sessionIds,
- stdx::function<bool(OperationContext* opCtx)> verifyTransactionParticipantFn,
- stdx::function<void(DBDirectClient* client, LogicalSessionId sessionId)>
- performModificationFn) {
+ std::function<bool(OperationContext* opCtx)> verifyTransactionParticipantFn,
+ std::function<void(DBDirectClient* client, LogicalSessionId sessionId)> performModificationFn) {
// Construct a new operation context to check out the session with.
auto clientForCheckout =
opCtx->getServiceContext()->makeClient("setFCV-transaction-table-checkout");
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp
index 623cffb0367..c47ca33f94c 100644
--- a/src/mongo/db/commands/user_management_commands.cpp
+++ b/src/mongo/db/commands/user_management_commands.cpp
@@ -33,6 +33,7 @@
#include "mongo/db/commands/user_management_commands.h"
+#include <functional>
#include <string>
#include <vector>
@@ -68,7 +69,6 @@
#include "mongo/db/service_context.h"
#include "mongo/rpc/get_status_from_command_result.h"
#include "mongo/s/write_ops/batched_command_response.h"
-#include "mongo/stdx/functional.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/unordered_set.h"
#include "mongo/util/icu.h"
@@ -246,7 +246,7 @@ Status queryAuthzDocument(OperationContext* opCtx,
const NamespaceString& collectionName,
const BSONObj& query,
const BSONObj& projection,
- const stdx::function<void(const BSONObj&)>& resultProcessor) {
+ const std::function<void(const BSONObj&)>& resultProcessor) {
try {
DBDirectClient client(opCtx);
client.query(resultProcessor, collectionName, query, &projection);