summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorADAM David Alan Martin <adam.martin@10gen.com>2018-02-13 14:09:32 -0500
committerADAM David Alan Martin <adam.martin@10gen.com>2018-02-14 15:57:45 -0500
commit060e32706980ffc84aac250022d55f92afcffa69 (patch)
treeb179eee919fd60d08c0a1cfbef716b31a7db9925 /src
parent8b6a6266458cfd065cb0133a909bae856e417882 (diff)
downloadmongo-060e32706980ffc84aac250022d55f92afcffa69.tar.gz
SERVER-33275 Remove `platform/unordered_`* headers
These headers date from before C++11 support and the `::mongo::stdx::` namespace. They can be removed and uses of the names therein can be changed to `::mongo::stdx::unordered_`* forms.
Diffstat (limited to 'src')
-rw-r--r--src/mongo/base/initializer_dependency_graph.cpp13
-rw-r--r--src/mongo/base/initializer_dependency_graph.h10
-rw-r--r--src/mongo/client/connection_pool.h6
-rw-r--r--src/mongo/db/auth/authorization_manager.cpp14
-rw-r--r--src/mongo/db/auth/authorization_manager.h4
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_local.cpp2
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_mock.cpp1
-rw-r--r--src/mongo/db/auth/role_graph.cpp8
-rw-r--r--src/mongo/db/auth/role_graph.h12
-rw-r--r--src/mongo/db/auth/sasl_authentication_session_test.cpp1
-rw-r--r--src/mongo/db/auth/user.cpp2
-rw-r--r--src/mongo/db/auth/user.h8
-rw-r--r--src/mongo/db/auth/user_management_commands_parser.cpp24
-rw-r--r--src/mongo/db/catalog/collection_info_cache_impl.cpp2
-rw-r--r--src/mongo/db/catalog/index_catalog.h1
-rw-r--r--src/mongo/db/catalog/index_catalog_impl.h1
-rw-r--r--src/mongo/db/client.h3
-rw-r--r--src/mongo/db/commands/geo_near_cmd.cpp1
-rw-r--r--src/mongo/db/commands/user_management_commands.cpp23
-rw-r--r--src/mongo/db/concurrency/fast_map_noalloc.h1
-rw-r--r--src/mongo/db/concurrency/fast_map_noalloc_test.cpp2
-rw-r--r--src/mongo/db/concurrency/lock_manager.h6
-rw-r--r--src/mongo/db/cursor_manager.cpp6
-rw-r--r--src/mongo/db/cursor_manager.h13
-rw-r--r--src/mongo/db/exec/and_hash.h8
-rw-r--r--src/mongo/db/exec/and_sorted.h1
-rw-r--r--src/mongo/db/exec/count_scan.cpp2
-rw-r--r--src/mongo/db/exec/count_scan.h4
-rw-r--r--src/mongo/db/exec/distinct_scan.h1
-rw-r--r--src/mongo/db/exec/index_scan.cpp2
-rw-r--r--src/mongo/db/exec/index_scan.h4
-rw-r--r--src/mongo/db/exec/merge_sort.h2
-rw-r--r--src/mongo/db/exec/near.cpp2
-rw-r--r--src/mongo/db/exec/near.h4
-rw-r--r--src/mongo/db/exec/or.cpp2
-rw-r--r--src/mongo/db/exec/or.h4
-rw-r--r--src/mongo/db/exec/sort.h4
-rw-r--r--src/mongo/db/exec/text_or.h4
-rw-r--r--src/mongo/db/exec/update.h2
-rw-r--r--src/mongo/db/exec/working_set.cpp2
-rw-r--r--src/mongo/db/exec/working_set.h3
-rw-r--r--src/mongo/db/fts/fts_spec.h10
-rw-r--r--src/mongo/db/index/haystack_access_method.cpp4
-rw-r--r--src/mongo/db/pipeline/value.h3
-rw-r--r--src/mongo/db/query/index_tag.cpp6
-rw-r--r--src/mongo/db/query/plan_enumerator.cpp16
-rw-r--r--src/mongo/db/query/plan_enumerator.h32
-rw-r--r--src/mongo/db/query/plan_executor.h12
-rw-r--r--src/mongo/db/query/planner_ixselect.cpp4
-rw-r--r--src/mongo/db/query/planner_ixselect.h6
-rw-r--r--src/mongo/db/query/planner_ixselect_test.cpp2
-rw-r--r--src/mongo/db/query/query_planner.cpp5
-rw-r--r--src/mongo/db/query/query_settings.h4
-rw-r--r--src/mongo/db/repl/check_quorum_for_config_change_test.cpp26
-rw-r--r--src/mongo/db/repl/freshness_checker_test.cpp14
-rw-r--r--src/mongo/db/repl/is_master_response.cpp2
-rw-r--r--src/mongo/db/repl/is_master_response.h6
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.h5
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp1
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_test.cpp2
-rw-r--r--src/mongo/db/repl/vote_requester.cpp4
-rw-r--r--src/mongo/db/repl/vote_requester.h8
-rw-r--r--src/mongo/db/service_context.h4
-rw-r--r--src/mongo/db/storage/mmap_v1/diskloc.h1
-rw-r--r--src/mongo/db/storage/mmap_v1/record_store_v1_base.h9
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp3
-rw-r--r--src/mongo/db/update/modifier_table.cpp1
-rw-r--r--src/mongo/dbtests/mock/mock_conn_registry.h7
-rw-r--r--src/mongo/dbtests/mock/mock_remote_db_server.h8
-rw-r--r--src/mongo/dbtests/query_stage_and.cpp4
-rw-r--r--src/mongo/executor/task_executor_test_common.cpp4
-rw-r--r--src/mongo/logger/log_manager.h4
-rw-r--r--src/mongo/logger/rotatable_file_manager.h4
-rw-r--r--src/mongo/platform/unordered_map.h36
-rw-r--r--src/mongo/platform/unordered_set.h36
-rw-r--r--src/mongo/s/write_ops/batch_write_op.h2
-rw-r--r--src/mongo/scripting/deadline_monitor.h2
-rw-r--r--src/mongo/scripting/engine.cpp5
-rw-r--r--src/mongo/shell/shell_utils_launcher.h9
-rw-r--r--src/mongo/util/concurrency/thread_pool_test_common.cpp2
-rw-r--r--src/mongo/util/fail_point_registry.h6
-rw-r--r--src/mongo/util/string_map_test.cpp3
82 files changed, 223 insertions, 314 deletions
diff --git a/src/mongo/base/initializer_dependency_graph.cpp b/src/mongo/base/initializer_dependency_graph.cpp
index bcfc7d50f11..927c8c87658 100644
--- a/src/mongo/base/initializer_dependency_graph.cpp
+++ b/src/mongo/base/initializer_dependency_graph.cpp
@@ -82,7 +82,7 @@ Status InitializerDependencyGraph::topSort(std::vector<std::string>* sortedNames
*/
std::vector<std::string> inProgressNodeNames;
- unordered_set<std::string> visitedNodeNames;
+ stdx::unordered_set<std::string> visitedNodeNames;
sortedNames->clear();
for (const auto& node : _nodes) {
@@ -101,11 +101,12 @@ Status InitializerDependencyGraph::topSort(std::vector<std::string>* sortedNames
return Status::OK();
}
-Status InitializerDependencyGraph::recursiveTopSort(const NodeMap& nodeMap,
- const Node& currentNode,
- std::vector<std::string>* inProgressNodeNames,
- unordered_set<std::string>* visitedNodeNames,
- std::vector<std::string>* sortedNames) {
+Status InitializerDependencyGraph::recursiveTopSort(
+ const NodeMap& nodeMap,
+ const Node& currentNode,
+ std::vector<std::string>* inProgressNodeNames,
+ stdx::unordered_set<std::string>* visitedNodeNames,
+ std::vector<std::string>* sortedNames) {
/*
* The top sort is performed by depth-first traversal starting at each node in the
diff --git a/src/mongo/base/initializer_dependency_graph.h b/src/mongo/base/initializer_dependency_graph.h
index 2be99a304f9..bad3154e19b 100644
--- a/src/mongo/base/initializer_dependency_graph.h
+++ b/src/mongo/base/initializer_dependency_graph.h
@@ -34,8 +34,8 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/base/initializer_function.h"
#include "mongo/base/status.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -103,10 +103,10 @@ public:
private:
struct NodeData {
InitializerFunction fn;
- unordered_set<std::string> prerequisites;
+ stdx::unordered_set<std::string> prerequisites;
};
- typedef unordered_map<std::string, NodeData> NodeMap;
+ typedef stdx::unordered_map<std::string, NodeData> NodeMap;
typedef NodeMap::value_type Node;
/**
@@ -115,7 +115,7 @@ private:
static Status recursiveTopSort(const NodeMap& nodeMap,
const Node& currentNode,
std::vector<std::string>* inProgressNodeNames,
- unordered_set<std::string>* visitedNodeNames,
+ stdx::unordered_set<std::string>* visitedNodeNames,
std::vector<std::string>* sortedNames);
/**
diff --git a/src/mongo/client/connection_pool.h b/src/mongo/client/connection_pool.h
index d3f6477865a..a359b47bfce 100644
--- a/src/mongo/client/connection_pool.h
+++ b/src/mongo/client/connection_pool.h
@@ -32,16 +32,16 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/client/dbclientinterface.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/list.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/net/hostandport.h"
#include "mongo/util/time_support.h"
namespace mongo {
namespace executor {
class NetworkConnectionHook;
-}
+} // namespace executor
/**
* Represents a pool of connections to a MongoDB server. The pool is synchronized internally
@@ -67,7 +67,7 @@ public:
};
typedef stdx::list<ConnectionInfo> ConnectionList;
- typedef unordered_map<HostAndPort, ConnectionList> HostConnectionMap;
+ typedef stdx::unordered_map<HostAndPort, ConnectionList> HostConnectionMap;
typedef std::map<HostAndPort, Date_t> HostLastUsedMap;
/**
diff --git a/src/mongo/db/auth/authorization_manager.cpp b/src/mongo/db/auth/authorization_manager.cpp
index 5ab5df70ee7..0b0bedd461e 100644
--- a/src/mongo/db/auth/authorization_manager.cpp
+++ b/src/mongo/db/auth/authorization_manager.cpp
@@ -57,9 +57,9 @@
#include "mongo/db/global_settings.h"
#include "mongo/db/jsobj.h"
#include "mongo/platform/compiler.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
@@ -280,7 +280,8 @@ AuthorizationManager::AuthorizationManager(std::unique_ptr<AuthzManagerExternalS
}
AuthorizationManager::~AuthorizationManager() {
- for (unordered_map<UserName, User*>::iterator it = _userCache.begin(); it != _userCache.end();
+ for (stdx::unordered_map<UserName, User*>::iterator it = _userCache.begin();
+ it != _userCache.end();
++it) {
fassert(17265, it->second != internalSecurity.user);
delete it->second;
@@ -484,7 +485,7 @@ Status AuthorizationManager::acquireUser(OperationContext* opCtx,
return Status::OK();
}
- unordered_map<UserName, User*>::iterator it;
+ stdx::unordered_map<UserName, User*>::iterator it;
CacheGuard guard(this, CacheGuard::fetchSynchronizationManual);
while ((_userCache.end() == (it = _userCache.find(userName))) &&
@@ -608,7 +609,7 @@ void AuthorizationManager::releaseUser(User* user) {
void AuthorizationManager::invalidateUserByName(const UserName& userName) {
CacheGuard guard(this, CacheGuard::fetchSynchronizationManual);
_updateCacheGeneration_inlock();
- unordered_map<UserName, User*>::iterator it = _userCache.find(userName);
+ stdx::unordered_map<UserName, User*>::iterator it = _userCache.find(userName);
if (it == _userCache.end()) {
return;
}
@@ -621,7 +622,7 @@ void AuthorizationManager::invalidateUserByName(const UserName& userName) {
void AuthorizationManager::invalidateUsersFromDB(const std::string& dbname) {
CacheGuard guard(this, CacheGuard::fetchSynchronizationManual);
_updateCacheGeneration_inlock();
- unordered_map<UserName, User*>::iterator it = _userCache.begin();
+ stdx::unordered_map<UserName, User*>::iterator it = _userCache.begin();
while (it != _userCache.end()) {
User* user = it->second;
if (user->getName().getDB() == dbname) {
@@ -640,7 +641,8 @@ void AuthorizationManager::invalidateUserCache() {
void AuthorizationManager::_invalidateUserCache_inlock() {
_updateCacheGeneration_inlock();
- for (unordered_map<UserName, User*>::iterator it = _userCache.begin(); it != _userCache.end();
+ for (stdx::unordered_map<UserName, User*>::iterator it = _userCache.begin();
+ it != _userCache.end();
++it) {
fassert(17266, it->second != internalSecurity.user);
it->second->invalidate();
diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h
index 8087bdbe849..c21d672c688 100644
--- a/src/mongo/db/auth/authorization_manager.h
+++ b/src/mongo/db/auth/authorization_manager.h
@@ -46,10 +46,10 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/server_options.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
@@ -412,7 +412,7 @@ private:
* has a reference count - the AuthorizationManager must not delete a User object in the
* cache unless its reference count is zero.
*/
- unordered_map<UserName, User*> _userCache;
+ stdx::unordered_map<UserName, User*> _userCache;
/**
* Current generation of cached data. Updated every time part of the cache gets
diff --git a/src/mongo/db/auth/authz_manager_external_state_local.cpp b/src/mongo/db/auth/authz_manager_external_state_local.cpp
index 3247c287d0d..9bef6410790 100644
--- a/src/mongo/db/auth/authz_manager_external_state_local.cpp
+++ b/src/mongo/db/auth/authz_manager_external_state_local.cpp
@@ -203,7 +203,7 @@ Status AuthzManagerExternalStateLocal::getUserDescription(OperationContext* opCt
void AuthzManagerExternalStateLocal::resolveUserRoles(mutablebson::Document* userDoc,
const std::vector<RoleName>& directRoles) {
- unordered_set<RoleName> indirectRoles;
+ stdx::unordered_set<RoleName> indirectRoles;
PrivilegeVector allPrivileges;
std::vector<SharedRestrictionDocument> allAuthenticationRestrictions;
bool isRoleGraphConsistent = false;
diff --git a/src/mongo/db/auth/authz_manager_external_state_mock.cpp b/src/mongo/db/auth/authz_manager_external_state_mock.cpp
index 8c89b47cc3f..fec42b1bf88 100644
--- a/src/mongo/db/auth/authz_manager_external_state_mock.cpp
+++ b/src/mongo/db/auth/authz_manager_external_state_mock.cpp
@@ -42,7 +42,6 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/operation_context_noop.h"
#include "mongo/db/update/update_driver.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/memory.h"
#include "mongo/util/map_util.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/auth/role_graph.cpp b/src/mongo/db/auth/role_graph.cpp
index b35df15d16d..d9ec88e072a 100644
--- a/src/mongo/db/auth/role_graph.cpp
+++ b/src/mongo/db/auth/role_graph.cpp
@@ -34,7 +34,7 @@
#include "mongo/db/auth/privilege.h"
#include "mongo/db/auth/role_name.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/mongoutils/str.h"
namespace mongo {
@@ -421,7 +421,7 @@ Status RoleGraph::recomputePrivilegeData() {
* we can get back to them after visiting their children.
*/
- unordered_set<RoleName> visitedRoles;
+ stdx::unordered_set<RoleName> visitedRoles;
for (EdgeSet::const_iterator it = _roleToSubordinates.begin(); it != _roleToSubordinates.end();
++it) {
Status status = _recomputePrivilegeDataHelper(it->first, visitedRoles);
@@ -433,7 +433,7 @@ Status RoleGraph::recomputePrivilegeData() {
}
Status RoleGraph::_recomputePrivilegeDataHelper(const RoleName& startingRole,
- unordered_set<RoleName>& visitedRoles) {
+ stdx::unordered_set<RoleName>& visitedRoles) {
if (visitedRoles.count(startingRole)) {
return Status::OK();
}
@@ -494,7 +494,7 @@ Status RoleGraph::_recomputePrivilegeDataHelper(const RoleName& startingRole,
currentRoleAllPrivileges = _directPrivilegesForRole[currentRole];
// Need to do the same thing for the indirect roles
- unordered_set<RoleName>& currentRoleIndirectRoles =
+ stdx::unordered_set<RoleName>& currentRoleIndirectRoles =
_roleToIndirectSubordinates[currentRole];
currentRoleIndirectRoles.clear();
for (const auto& role : currentRoleDirectRoles) {
diff --git a/src/mongo/db/auth/role_graph.h b/src/mongo/db/auth/role_graph.h
index 6eae09223da..1b8678609a7 100644
--- a/src/mongo/db/auth/role_graph.h
+++ b/src/mongo/db/auth/role_graph.h
@@ -37,8 +37,8 @@
#include "mongo/db/auth/restriction_set.h"
#include "mongo/db/auth/role_name.h"
#include "mongo/db/namespace_string.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -294,7 +294,7 @@ private:
// Helper method doing a topological DFS to compute the indirect privilege
// data and look for cycles
Status _recomputePrivilegeDataHelper(const RoleName& currentRole,
- unordered_set<RoleName>& visitedRoles);
+ stdx::unordered_set<RoleName>& visitedRoles);
/**
* If the role name given is not a built-in role, or it is but it's already in the role
@@ -328,9 +328,9 @@ private:
// Represents all the outgoing edges to other roles from any given role.
- using EdgeSet = unordered_map<RoleName, std::vector<RoleName>>;
+ using EdgeSet = stdx::unordered_map<RoleName, std::vector<RoleName>>;
// Maps a role name to a list of privileges associated with that role.
- using RolePrivilegeMap = unordered_map<RoleName, PrivilegeVector>;
+ using RolePrivilegeMap = stdx::unordered_map<RoleName, PrivilegeVector>;
// Maps a role name to a restriction document.
using RestrictionDocumentMap = stdx::unordered_map<RoleName, SharedRestrictionDocument>;
@@ -339,7 +339,7 @@ private:
stdx::unordered_map<RoleName, std::vector<SharedRestrictionDocument>>;
EdgeSet _roleToSubordinates;
- unordered_map<RoleName, unordered_set<RoleName>> _roleToIndirectSubordinates;
+ stdx::unordered_map<RoleName, stdx::unordered_set<RoleName>> _roleToIndirectSubordinates;
EdgeSet _roleToMembers;
RolePrivilegeMap _directPrivilegesForRole;
RolePrivilegeMap _allPrivilegesForRole;
diff --git a/src/mongo/db/auth/sasl_authentication_session_test.cpp b/src/mongo/db/auth/sasl_authentication_session_test.cpp
index ebabda5bfe3..7226395ece6 100644
--- a/src/mongo/db/auth/sasl_authentication_session_test.cpp
+++ b/src/mongo/db/auth/sasl_authentication_session_test.cpp
@@ -20,7 +20,6 @@
#include "mongo/db/auth/sasl_options.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/operation_context_noop.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/log.h"
#include "mongo/util/password_digest.h"
diff --git a/src/mongo/db/auth/user.cpp b/src/mongo/db/auth/user.cpp
index a14a033a536..c233e8a1d8b 100644
--- a/src/mongo/db/auth/user.cpp
+++ b/src/mongo/db/auth/user.cpp
@@ -110,7 +110,7 @@ uint32_t User::getRefCount() const {
}
const ActionSet User::getActionsForResource(const ResourcePattern& resource) const {
- unordered_map<ResourcePattern, Privilege>::const_iterator it = _privileges.find(resource);
+ stdx::unordered_map<ResourcePattern, Privilege>::const_iterator it = _privileges.find(resource);
if (it == _privileges.end()) {
return ActionSet();
}
diff --git a/src/mongo/db/auth/user.h b/src/mongo/db/auth/user.h
index 742fd96d17e..3af4f6abbf3 100644
--- a/src/mongo/db/auth/user.h
+++ b/src/mongo/db/auth/user.h
@@ -39,8 +39,8 @@
#include "mongo/db/auth/role_name.h"
#include "mongo/db/auth/user_name.h"
#include "mongo/platform/atomic_word.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -98,7 +98,7 @@ public:
const SCRAMCredentials<HashBlock>& scram() const;
};
- typedef unordered_map<ResourcePattern, Privilege> ResourcePrivilegeMap;
+ typedef stdx::unordered_map<ResourcePattern, Privilege> ResourcePrivilegeMap;
explicit User(const UserName& name);
~User();
@@ -249,7 +249,7 @@ private:
ResourcePrivilegeMap _privileges;
// Roles the user has privileges from
- unordered_set<RoleName> _roles;
+ stdx::unordered_set<RoleName> _roles;
// Roles that the user indirectly has privileges from, due to role inheritance.
std::vector<RoleName> _indirectRoles;
diff --git a/src/mongo/db/auth/user_management_commands_parser.cpp b/src/mongo/db/auth/user_management_commands_parser.cpp
index 44f1d03cf79..e1769fdc5c3 100644
--- a/src/mongo/db/auth/user_management_commands_parser.cpp
+++ b/src/mongo/db/auth/user_management_commands_parser.cpp
@@ -45,7 +45,7 @@
#include "mongo/db/auth/user_name.h"
#include "mongo/db/commands.h"
#include "mongo/db/jsobj.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/password_digest.h"
#include "mongo/util/stringutils.h"
@@ -57,7 +57,7 @@ using std::vector;
Status _checkNoExtraFields(const BSONObj& cmdObj,
StringData cmdName,
- const unordered_set<std::string>& validFieldNames) {
+ const stdx::unordered_set<std::string>& validFieldNames) {
// Iterate through all fields in command object and make sure there are no unexpected
// ones.
for (BSONObjIterator iter(cmdObj); iter.more(); iter.next()) {
@@ -149,7 +149,7 @@ Status parseRolePossessionManipulationCommands(const BSONObj& cmdObj,
const std::string& dbname,
std::string* parsedName,
vector<RoleName>* parsedRoleNames) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert(cmdName.toString());
validFieldNames.insert("roles");
@@ -186,7 +186,7 @@ Status parseCreateOrUpdateUserCommands(const BSONObj& cmdObj,
StringData cmdName,
const std::string& dbname,
CreateOrUpdateUserArgs* parsedArgs) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert(cmdName.toString());
validFieldNames.insert("customData");
validFieldNames.insert("digestPassword");
@@ -281,7 +281,7 @@ Status parseCreateOrUpdateUserCommands(const BSONObj& cmdObj,
Status parseAndValidateDropUserCommand(const BSONObj& cmdObj,
const std::string& dbname,
UserName* parsedUserName) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert("dropUser");
Status status = _checkNoExtraFields(cmdObj, "dropUser", validFieldNames);
@@ -302,7 +302,7 @@ Status parseAndValidateDropUserCommand(const BSONObj& cmdObj,
Status parseFromDatabaseCommand(const BSONObj& cmdObj,
const std::string& dbname,
std::string command) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert(command);
Status status = _checkNoExtraFields(cmdObj, command, validFieldNames);
@@ -318,7 +318,7 @@ Status parseAndValidateDropAllUsersFromDatabaseCommand(const BSONObj& cmdObj,
}
Status parseUsersInfoCommand(const BSONObj& cmdObj, StringData dbname, UsersInfoArgs* parsedArgs) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert("usersInfo");
validFieldNames.insert("showAuthenticationRestrictions");
validFieldNames.insert("showPrivileges");
@@ -380,7 +380,7 @@ Status parseUsersInfoCommand(const BSONObj& cmdObj, StringData dbname, UsersInfo
}
Status parseRolesInfoCommand(const BSONObj& cmdObj, StringData dbname, RolesInfoArgs* parsedArgs) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert("rolesInfo");
validFieldNames.insert("showPrivileges");
validFieldNames.insert("showAuthenticationRestrictions");
@@ -501,7 +501,7 @@ Status parseCreateOrUpdateRoleCommands(const BSONObj& cmdObj,
StringData cmdName,
const std::string& dbname,
CreateOrUpdateRoleArgs* parsedArgs) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert(cmdName.toString());
validFieldNames.insert("privileges");
validFieldNames.insert("roles");
@@ -577,7 +577,7 @@ Status parseAndValidateRolePrivilegeManipulationCommands(const BSONObj& cmdObj,
const std::string& dbname,
RoleName* parsedRoleName,
PrivilegeVector* parsedPrivileges) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert(cmdName.toString());
validFieldNames.insert("privileges");
@@ -618,7 +618,7 @@ Status parseAndValidateRolePrivilegeManipulationCommands(const BSONObj& cmdObj,
Status parseDropRoleCommand(const BSONObj& cmdObj,
const std::string& dbname,
RoleName* parsedRoleName) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert("dropRole");
Status status = _checkNoExtraFields(cmdObj, "dropRole", validFieldNames);
@@ -642,7 +642,7 @@ Status parseDropAllRolesFromDatabaseCommand(const BSONObj& cmdObj, const std::st
Status parseMergeAuthzCollectionsCommand(const BSONObj& cmdObj,
MergeAuthzCollectionsArgs* parsedArgs) {
- unordered_set<std::string> validFieldNames;
+ stdx::unordered_set<std::string> validFieldNames;
validFieldNames.insert("_mergeAuthzCollections");
validFieldNames.insert("tempUsersCollection");
validFieldNames.insert("tempRolesCollection");
diff --git a/src/mongo/db/catalog/collection_info_cache_impl.cpp b/src/mongo/db/catalog/collection_info_cache_impl.cpp
index aa56adeabe6..b3366f70ae2 100644
--- a/src/mongo/db/catalog/collection_info_cache_impl.cpp
+++ b/src/mongo/db/catalog/collection_info_cache_impl.cpp
@@ -130,7 +130,7 @@ void CollectionInfoCacheImpl::computeIndexKeys(OperationContext* opCtx) {
const IndexCatalogEntry* entry = i.catalogEntry(descriptor);
const MatchExpression* filter = entry->getFilterExpression();
if (filter) {
- unordered_set<std::string> paths;
+ stdx::unordered_set<std::string> paths;
QueryPlannerIXSelect::getFields(filter, "", &paths);
for (auto it = paths.begin(); it != paths.end(); ++it) {
_indexedPaths.addPath(*it);
diff --git a/src/mongo/db/catalog/index_catalog.h b/src/mongo/db/catalog/index_catalog.h
index d6d98612984..1e56e83cd9c 100644
--- a/src/mongo/db/catalog/index_catalog.h
+++ b/src/mongo/db/catalog/index_catalog.h
@@ -39,7 +39,6 @@
#include "mongo/db/record_id.h"
#include "mongo/db/server_options.h"
#include "mongo/db/storage/record_store.h"
-#include "mongo/platform/unordered_map.h"
namespace mongo {
class Client;
diff --git a/src/mongo/db/catalog/index_catalog_impl.h b/src/mongo/db/catalog/index_catalog_impl.h
index c8d3af2992b..e181825523f 100644
--- a/src/mongo/db/catalog/index_catalog_impl.h
+++ b/src/mongo/db/catalog/index_catalog_impl.h
@@ -39,7 +39,6 @@
#include "mongo/db/record_id.h"
#include "mongo/db/server_options.h"
#include "mongo/db/storage/record_store.h"
-#include "mongo/platform/unordered_map.h"
namespace mongo {
diff --git a/src/mongo/db/client.h b/src/mongo/db/client.h
index da62a560366..86629690af2 100644
--- a/src/mongo/db/client.h
+++ b/src/mongo/db/client.h
@@ -43,7 +43,6 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/service_context.h"
#include "mongo/platform/random.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/thread.h"
#include "mongo/transport/session.h"
#include "mongo/util/concurrency/spin_lock.h"
@@ -249,4 +248,4 @@ private:
Client& cc();
bool haveClient();
-};
+} // namespace mongo
diff --git a/src/mongo/db/commands/geo_near_cmd.cpp b/src/mongo/db/commands/geo_near_cmd.cpp
index 51ee3c4c015..6fff31aabd5 100644
--- a/src/mongo/db/commands/geo_near_cmd.cpp
+++ b/src/mongo/db/commands/geo_near_cmd.cpp
@@ -54,7 +54,6 @@
#include "mongo/db/query/find_common.h"
#include "mongo/db/query/get_executor.h"
#include "mongo/db/query/plan_summary_stats.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/util/log.h"
namespace mongo {
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp
index 480a36df544..858eac30f79 100644
--- a/src/mongo/db/commands/user_management_commands.cpp
+++ b/src/mongo/db/commands/user_management_commands.cpp
@@ -64,11 +64,11 @@
#include "mongo/db/operation_context.h"
#include "mongo/db/ops/write_ops.h"
#include "mongo/db/service_context.h"
-#include "mongo/platform/unordered_set.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/log.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/net/ssl_manager.h"
@@ -93,9 +93,10 @@ Status useDefaultCode(const Status& status, ErrorCodes::Error defaultCode) {
return Status(defaultCode, status.reason());
}
-BSONArray roleSetToBSONArray(const unordered_set<RoleName>& roles) {
+BSONArray roleSetToBSONArray(const stdx::unordered_set<RoleName>& roles) {
BSONArrayBuilder rolesArrayBuilder;
- for (unordered_set<RoleName>::const_iterator it = roles.begin(); it != roles.end(); ++it) {
+ for (stdx::unordered_set<RoleName>::const_iterator it = roles.begin(); it != roles.end();
+ ++it) {
const RoleName& role = *it;
rolesArrayBuilder.append(BSON(AuthorizationManager::ROLE_NAME_FIELD_NAME
<< role.getRole()
@@ -142,7 +143,7 @@ Status privilegeVectorToBSONArray(const PrivilegeVector& privileges, BSONArray*
Status getCurrentUserRoles(OperationContext* opCtx,
AuthorizationManager* authzManager,
const UserName& userName,
- unordered_set<RoleName>* roles) {
+ stdx::unordered_set<RoleName>* roles) {
User* user;
authzManager->invalidateUserByName(userName); // Need to make sure cache entry is up to date
Status status = authzManager->acquireUser(opCtx, userName, &user);
@@ -1055,7 +1056,7 @@ public:
}
UserName userName(userNameString, dbname);
- unordered_set<RoleName> userRoles;
+ stdx::unordered_set<RoleName> userRoles;
status = getCurrentUserRoles(opCtx, authzManager, userName, &userRoles);
if (!status.isOK()) {
return CommandHelpers::appendCommandStatus(result, status);
@@ -1127,7 +1128,7 @@ public:
}
UserName userName(userNameString, dbname);
- unordered_set<RoleName> userRoles;
+ stdx::unordered_set<RoleName> userRoles;
status = getCurrentUserRoles(opCtx, authzManager, userName, &userRoles);
if (!status.isOK()) {
return CommandHelpers::appendCommandStatus(result, status);
@@ -2480,7 +2481,7 @@ public:
AuthorizationManager* authzManager,
StringData db,
bool update,
- unordered_set<UserName>* usersToDrop,
+ stdx::unordered_set<UserName>* usersToDrop,
const BSONObj& userObj) {
UserName userName = extractUserNameFromBSON(userObj);
if (!db.empty() && userName.getDB() != db) {
@@ -2518,7 +2519,7 @@ public:
AuthorizationManager* authzManager,
StringData db,
bool update,
- unordered_set<RoleName>* rolesToDrop,
+ stdx::unordered_set<RoleName>* rolesToDrop,
const BSONObj roleObj) {
RoleName roleName = extractRoleNameFromBSON(roleObj);
if (!db.empty() && roleName.getDB() != db) {
@@ -2563,7 +2564,7 @@ public:
// collection with the users from the temp collection, without removing all
// users at the beginning and thus potentially locking ourselves out by having
// no users in the whole system for a time.
- unordered_set<UserName> usersToDrop;
+ stdx::unordered_set<UserName> usersToDrop;
if (drop) {
// Create map of the users currently in the DB
@@ -2636,7 +2637,7 @@ public:
// This is so that we can completely replace the system.roles
// collection with the roles from the temp collection, without removing all
// roles at the beginning and thus potentially locking ourselves out.
- unordered_set<RoleName> rolesToDrop;
+ stdx::unordered_set<RoleName> rolesToDrop;
if (drop) {
// Create map of the roles currently in the DB
@@ -2674,7 +2675,7 @@ public:
if (drop) {
long long numRemoved;
- for (unordered_set<RoleName>::iterator it = rolesToDrop.begin();
+ for (stdx::unordered_set<RoleName>::iterator it = rolesToDrop.begin();
it != rolesToDrop.end();
++it) {
const RoleName& roleName = *it;
diff --git a/src/mongo/db/concurrency/fast_map_noalloc.h b/src/mongo/db/concurrency/fast_map_noalloc.h
index e08909b8439..b6fdcf0a7a3 100644
--- a/src/mongo/db/concurrency/fast_map_noalloc.h
+++ b/src/mongo/db/concurrency/fast_map_noalloc.h
@@ -29,7 +29,6 @@
#pragma once
#include "mongo/base/static_assert.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/util/assert_util.h"
namespace mongo {
diff --git a/src/mongo/db/concurrency/fast_map_noalloc_test.cpp b/src/mongo/db/concurrency/fast_map_noalloc_test.cpp
index d03d1d59fc1..a75d62f521e 100644
--- a/src/mongo/db/concurrency/fast_map_noalloc_test.cpp
+++ b/src/mongo/db/concurrency/fast_map_noalloc_test.cpp
@@ -147,7 +147,7 @@ TEST(FastMapNoAlloc, FindAndRemove) {
TEST(FastMapNoAlloc, RemoveAll) {
TestFastMapNoAlloc map;
- unordered_map<ResourceId, TestStruct> checkMap;
+ stdx::unordered_map<ResourceId, TestStruct> checkMap;
for (int i = 1; i <= 6; i++) {
map.insert(ResourceId(RESOURCE_COLLECTION, i))
diff --git a/src/mongo/db/concurrency/lock_manager.h b/src/mongo/db/concurrency/lock_manager.h
index ec807345177..ae64a9c3398 100644
--- a/src/mongo/db/concurrency/lock_manager.h
+++ b/src/mongo/db/concurrency/lock_manager.h
@@ -39,9 +39,9 @@
#include "mongo/db/concurrency/lock_request_list.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/platform/compiler.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/mutex.h"
namespace mongo {
@@ -142,7 +142,7 @@ private:
struct LockBucket {
SimpleMutex mutex;
- typedef unordered_map<ResourceId, LockHead*> Map;
+ typedef stdx::unordered_map<ResourceId, LockHead*> Map;
Map data;
LockHead* findOrInsert(ResourceId resId);
};
@@ -153,7 +153,7 @@ private:
struct Partition {
PartitionedLockHead* find(ResourceId resId);
PartitionedLockHead* findOrInsert(ResourceId resId);
- typedef unordered_map<ResourceId, PartitionedLockHead*> Map;
+ typedef stdx::unordered_map<ResourceId, PartitionedLockHead*> Map;
SimpleMutex mutex;
Map data;
};
diff --git a/src/mongo/db/cursor_manager.cpp b/src/mongo/db/cursor_manager.cpp
index 5168b638e0a..061a5a59cc5 100644
--- a/src/mongo/db/cursor_manager.cpp
+++ b/src/mongo/db/cursor_manager.cpp
@@ -110,7 +110,7 @@ public:
private:
SimpleMutex _mutex;
- typedef unordered_map<unsigned, NamespaceString> Map;
+ typedef stdx::unordered_map<unsigned, NamespaceString> Map;
Map _idToNss;
unsigned _nextId;
@@ -400,7 +400,7 @@ CursorManager::CursorManager(NamespaceString nss)
: globalCursorIdCache->registerCursorManager(_nss)),
_random(stdx::make_unique<PseudoRandom>(globalCursorIdCache->nextSeed())),
_registeredPlanExecutors(),
- _cursorMap(stdx::make_unique<Partitioned<unordered_map<CursorId, ClientCursor*>>>()) {}
+ _cursorMap(stdx::make_unique<Partitioned<stdx::unordered_map<CursorId, ClientCursor*>>>()) {}
CursorManager::~CursorManager() {
// All cursors and PlanExecutors should have been deleted already.
@@ -515,7 +515,7 @@ namespace {
static AtomicUInt32 registeredPlanExecutorId;
} // namespace
-Partitioned<unordered_set<PlanExecutor*>>::PartitionId CursorManager::registerExecutor(
+Partitioned<stdx::unordered_set<PlanExecutor*>>::PartitionId CursorManager::registerExecutor(
PlanExecutor* exec) {
auto partitionId = registeredPlanExecutorId.fetchAndAdd(1);
exec->setRegistrationToken(partitionId);
diff --git a/src/mongo/db/cursor_manager.h b/src/mongo/db/cursor_manager.h
index f8dcebb803d..90895407f53 100644
--- a/src/mongo/db/cursor_manager.h
+++ b/src/mongo/db/cursor_manager.h
@@ -39,8 +39,7 @@
#include "mongo/db/namespace_string.h"
#include "mongo/db/record_id.h"
#include "mongo/db/session_killer.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/stdx/unordered_set.h"
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/duration.h"
@@ -80,7 +79,7 @@ class PlanExecutor;
*/
class CursorManager {
public:
- using RegistrationToken = Partitioned<unordered_set<PlanExecutor*>>::PartitionId;
+ using RegistrationToken = Partitioned<stdx::unordered_set<PlanExecutor*>>::PartitionId;
/**
* Appends the sessions that have open cursors on the global cursor manager and across
@@ -143,7 +142,8 @@ public:
* happens automatically for yielding PlanExecutors, so this should only be called by a
* PlanExecutor itself. Returns a token that must be stored for use during deregistration.
*/
- Partitioned<unordered_set<PlanExecutor*>>::PartitionId registerExecutor(PlanExecutor* exec);
+ Partitioned<stdx::unordered_set<PlanExecutor*>>::PartitionId registerExecutor(
+ PlanExecutor* exec);
/**
* Remove an executor from the registry. It is legal to call this even if 'exec' is not
@@ -296,8 +296,9 @@ private:
// partition helpers to acquire mutexes for all partitions.
mutable SimpleMutex _registrationLock;
std::unique_ptr<PseudoRandom> _random;
- Partitioned<unordered_set<PlanExecutor*>, kNumPartitions, PlanExecutorPartitioner>
+ Partitioned<stdx::unordered_set<PlanExecutor*>, kNumPartitions, PlanExecutorPartitioner>
_registeredPlanExecutors;
- std::unique_ptr<Partitioned<unordered_map<CursorId, ClientCursor*>, kNumPartitions>> _cursorMap;
+ std::unique_ptr<Partitioned<stdx::unordered_map<CursorId, ClientCursor*>, kNumPartitions>>
+ _cursorMap;
};
} // namespace mongo
diff --git a/src/mongo/db/exec/and_hash.h b/src/mongo/db/exec/and_hash.h
index 8d28f72e16e..92996adba31 100644
--- a/src/mongo/db/exec/and_hash.h
+++ b/src/mongo/db/exec/and_hash.h
@@ -34,8 +34,8 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -105,12 +105,12 @@ private:
// _dataMap is filled out by the first child and probed by subsequent children. This is the
// hash table that we create by intersecting _children and probe with the last child.
- typedef unordered_map<RecordId, WorkingSetID, RecordId::Hasher> DataMap;
+ typedef stdx::unordered_map<RecordId, WorkingSetID, RecordId::Hasher> DataMap;
DataMap _dataMap;
// Keeps track of what elements from _dataMap subsequent children have seen.
// Only used while _hashingChildren.
- typedef unordered_set<RecordId, RecordId::Hasher> SeenMap;
+ typedef stdx::unordered_set<RecordId, RecordId::Hasher> SeenMap;
SeenMap _seenMap;
// True if we're still intersecting _children[0..._children.size()-1].
diff --git a/src/mongo/db/exec/and_sorted.h b/src/mongo/db/exec/and_sorted.h
index b7f422a0136..28ba43b954a 100644
--- a/src/mongo/db/exec/and_sorted.h
+++ b/src/mongo/db/exec/and_sorted.h
@@ -35,7 +35,6 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_set.h"
namespace mongo {
diff --git a/src/mongo/db/exec/count_scan.cpp b/src/mongo/db/exec/count_scan.cpp
index 8fa0433fe7d..06938484f75 100644
--- a/src/mongo/db/exec/count_scan.cpp
+++ b/src/mongo/db/exec/count_scan.cpp
@@ -179,7 +179,7 @@ void CountScan::doInvalidate(OperationContext* opCtx, const RecordId& dl, Invali
// If we see this RecordId again, it may not be the same document it was before, so we want
// to return it if we see it again.
- unordered_set<RecordId, RecordId::Hasher>::iterator it = _returned.find(dl);
+ stdx::unordered_set<RecordId, RecordId::Hasher>::iterator it = _returned.find(dl);
if (it != _returned.end()) {
_returned.erase(it);
}
diff --git a/src/mongo/db/exec/count_scan.h b/src/mongo/db/exec/count_scan.h
index d4eb4656133..37ac7b33085 100644
--- a/src/mongo/db/exec/count_scan.h
+++ b/src/mongo/db/exec/count_scan.h
@@ -35,7 +35,7 @@
#include "mongo/db/matcher/expression.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -99,7 +99,7 @@ private:
// Could our index have duplicates? If so, we use _returned to dedup.
bool _shouldDedup;
- unordered_set<RecordId, RecordId::Hasher> _returned;
+ stdx::unordered_set<RecordId, RecordId::Hasher> _returned;
CountScanParams _params;
diff --git a/src/mongo/db/exec/distinct_scan.h b/src/mongo/db/exec/distinct_scan.h
index d87090dcfd6..b6bd7d02822 100644
--- a/src/mongo/db/exec/distinct_scan.h
+++ b/src/mongo/db/exec/distinct_scan.h
@@ -35,7 +35,6 @@
#include "mongo/db/matcher/expression.h"
#include "mongo/db/query/index_bounds.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_set.h"
namespace mongo {
diff --git a/src/mongo/db/exec/index_scan.cpp b/src/mongo/db/exec/index_scan.cpp
index 3459739ed0d..56b6276b7c1 100644
--- a/src/mongo/db/exec/index_scan.cpp
+++ b/src/mongo/db/exec/index_scan.cpp
@@ -276,7 +276,7 @@ void IndexScan::doInvalidate(OperationContext* opCtx, const RecordId& dl, Invali
// If we see this RecordId again, it may not be the same document it was before, so we want
// to return it if we see it again.
- unordered_set<RecordId, RecordId::Hasher>::iterator it = _returned.find(dl);
+ stdx::unordered_set<RecordId, RecordId::Hasher>::iterator it = _returned.find(dl);
if (it != _returned.end()) {
++_specificStats.seenInvalidated;
_returned.erase(it);
diff --git a/src/mongo/db/exec/index_scan.h b/src/mongo/db/exec/index_scan.h
index 7dfdbd4753b..12ff25b15da 100644
--- a/src/mongo/db/exec/index_scan.h
+++ b/src/mongo/db/exec/index_scan.h
@@ -37,7 +37,7 @@
#include "mongo/db/record_id.h"
#include "mongo/db/storage/index_entry_comparison.h"
#include "mongo/db/storage/sorted_data_interface.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -137,7 +137,7 @@ private:
// Could our index have duplicates? If so, we use _returned to dedup.
bool _shouldDedup;
- unordered_set<RecordId, RecordId::Hasher> _returned;
+ stdx::unordered_set<RecordId, RecordId::Hasher> _returned;
const bool _forward;
const IndexScanParams _params;
diff --git a/src/mongo/db/exec/merge_sort.h b/src/mongo/db/exec/merge_sort.h
index 6a2121a3bdf..a1dac80c770 100644
--- a/src/mongo/db/exec/merge_sort.h
+++ b/src/mongo/db/exec/merge_sort.h
@@ -96,7 +96,7 @@ private:
bool _dedup;
// Which RecordIds have we seen?
- unordered_set<RecordId, RecordId::Hasher> _seen;
+ stdx::unordered_set<RecordId, RecordId::Hasher> _seen;
// In order to pick the next smallest value, we need each child work(...) until it produces
// a result. This is the queue of children that haven't given us a result yet.
diff --git a/src/mongo/db/exec/near.cpp b/src/mongo/db/exec/near.cpp
index 1c7b4135631..7424adca28d 100644
--- a/src/mongo/db/exec/near.cpp
+++ b/src/mongo/db/exec/near.cpp
@@ -287,7 +287,7 @@ bool NearStage::isEOF() {
void NearStage::doInvalidate(OperationContext* opCtx, const RecordId& dl, InvalidationType type) {
// If a result is in _resultBuffer and has a RecordId it will be in _seenDocuments as
// well. It's safe to return the result w/o the RecordId, so just fetch the result.
- unordered_map<RecordId, WorkingSetID, RecordId::Hasher>::iterator seenIt =
+ stdx::unordered_map<RecordId, WorkingSetID, RecordId::Hasher>::iterator seenIt =
_seenDocuments.find(dl);
if (seenIt != _seenDocuments.end()) {
diff --git a/src/mongo/db/exec/near.h b/src/mongo/db/exec/near.h
index fae4cb71b6c..d5971aa3949 100644
--- a/src/mongo/db/exec/near.h
+++ b/src/mongo/db/exec/near.h
@@ -40,7 +40,7 @@
#include "mongo/db/exec/working_set.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
@@ -184,7 +184,7 @@ private:
// May need to track disklocs from the child stage to do our own deduping, also to do
// invalidation of buffered results.
- unordered_map<RecordId, WorkingSetID, RecordId::Hasher> _seenDocuments;
+ stdx::unordered_map<RecordId, WorkingSetID, RecordId::Hasher> _seenDocuments;
// Stats for the stage covering this interval
// This is owned by _specificStats
diff --git a/src/mongo/db/exec/or.cpp b/src/mongo/db/exec/or.cpp
index 329636ce977..44d88f26d12 100644
--- a/src/mongo/db/exec/or.cpp
+++ b/src/mongo/db/exec/or.cpp
@@ -135,7 +135,7 @@ void OrStage::doInvalidate(OperationContext* opCtx, const RecordId& dl, Invalida
// If we see DL again it is not the same record as it once was so we still want to
// return it.
if (_dedup && INVALIDATION_DELETION == type) {
- unordered_set<RecordId, RecordId::Hasher>::iterator it = _seen.find(dl);
+ stdx::unordered_set<RecordId, RecordId::Hasher>::iterator it = _seen.find(dl);
if (_seen.end() != it) {
++_specificStats.recordIdsForgotten;
_seen.erase(dl);
diff --git a/src/mongo/db/exec/or.h b/src/mongo/db/exec/or.h
index 84ded543c82..0fd68249a5d 100644
--- a/src/mongo/db/exec/or.h
+++ b/src/mongo/db/exec/or.h
@@ -32,7 +32,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/matcher/expression.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -81,7 +81,7 @@ private:
bool _dedup;
// Which RecordIds have we returned?
- unordered_set<RecordId, RecordId::Hasher> _seen;
+ stdx::unordered_set<RecordId, RecordId::Hasher> _seen;
// Stats
OrStats _specificStats;
diff --git a/src/mongo/db/exec/sort.h b/src/mongo/db/exec/sort.h
index b65f5d4b824..3418cea9447 100644
--- a/src/mongo/db/exec/sort.h
+++ b/src/mongo/db/exec/sort.h
@@ -37,7 +37,7 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/query/index_bounds.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
@@ -171,7 +171,7 @@ private:
std::vector<SortableDataItem>::iterator _resultIterator;
// We buffer a lot of data and we want to look it up by RecordId quickly upon invalidation.
- typedef unordered_map<RecordId, WorkingSetID, RecordId::Hasher> DataMap;
+ typedef stdx::unordered_map<RecordId, WorkingSetID, RecordId::Hasher> DataMap;
DataMap _wsidByRecordId;
SortStats _specificStats;
diff --git a/src/mongo/db/exec/text_or.h b/src/mongo/db/exec/text_or.h
index a705d53cfef..5ce9a6dbab6 100644
--- a/src/mongo/db/exec/text_or.h
+++ b/src/mongo/db/exec/text_or.h
@@ -150,7 +150,7 @@ private:
double score;
};
- typedef unordered_map<RecordId, TextRecordData, RecordId::Hasher> ScoreMap;
+ typedef stdx::unordered_map<RecordId, TextRecordData, RecordId::Hasher> ScoreMap;
ScoreMap _scores;
ScoreMap::const_iterator _scoreIterator;
@@ -162,4 +162,4 @@ private:
std::unique_ptr<SeekableRecordCursor> _recordCursor;
IndexDescriptor* _index;
};
-}
+} // namespace mongo
diff --git a/src/mongo/db/exec/update.h b/src/mongo/db/exec/update.h
index 0755a6fbcff..42702836a3a 100644
--- a/src/mongo/db/exec/update.h
+++ b/src/mongo/db/exec/update.h
@@ -208,7 +208,7 @@ private:
// document and we wouldn't want to update that.
//
// So, no matter what, we keep track of where the doc wound up.
- typedef unordered_set<RecordId, RecordId::Hasher> RecordIdSet;
+ typedef stdx::unordered_set<RecordId, RecordId::Hasher> RecordIdSet;
const std::unique_ptr<RecordIdSet> _updatedRecordIds;
// These get reused for each update.
diff --git a/src/mongo/db/exec/working_set.cpp b/src/mongo/db/exec/working_set.cpp
index 6e8efc34e59..1dc83678df0 100644
--- a/src/mongo/db/exec/working_set.cpp
+++ b/src/mongo/db/exec/working_set.cpp
@@ -86,7 +86,7 @@ void WorkingSet::flagForReview(WorkingSetID i) {
_flagged.insert(i);
}
-const unordered_set<WorkingSetID>& WorkingSet::getFlagged() const {
+const stdx::unordered_set<WorkingSetID>& WorkingSet::getFlagged() const {
return _flagged;
}
diff --git a/src/mongo/db/exec/working_set.h b/src/mongo/db/exec/working_set.h
index 5fd9b6d93a2..1de7a062e6c 100644
--- a/src/mongo/db/exec/working_set.h
+++ b/src/mongo/db/exec/working_set.h
@@ -34,7 +34,6 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/record_id.h"
#include "mongo/db/storage/snapshot.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -110,7 +109,7 @@ public:
/**
* Return the set of all WSIDs passed to flagForReview.
*/
- const unordered_set<WorkingSetID>& getFlagged() const;
+ const stdx::unordered_set<WorkingSetID>& getFlagged() const;
/**
* Removes and deallocates all members of this working set.
diff --git a/src/mongo/db/fts/fts_spec.h b/src/mongo/db/fts/fts_spec.h
index 8cd293e70cf..01390cc90b6 100644
--- a/src/mongo/db/fts/fts_spec.h
+++ b/src/mongo/db/fts/fts_spec.h
@@ -1,5 +1,3 @@
-// fts_spec.h
-
/**
* Copyright (C) 2012 10gen Inc.
*
@@ -40,7 +38,7 @@
#include "mongo/db/fts/stemmer.h"
#include "mongo/db/fts/stop_words.h"
#include "mongo/db/fts/tokenizer.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/string_map.h"
namespace mongo {
@@ -52,7 +50,7 @@ extern const double MAX_WORD_WEIGHT;
extern const double DEFAULT_WEIGHT;
typedef std::map<std::string, double> Weights; // TODO cool map
-typedef unordered_map<std::string, double> TermFrequencyMap;
+typedef stdx::unordered_map<std::string, double> TermFrequencyMap;
struct ScoreHelperStruct {
ScoreHelperStruct() : freq(0), count(0), exp(0) {}
@@ -186,5 +184,5 @@ private:
// Suffix compound key - used for covering index behavior
std::vector<std::string> _extraAfter;
};
-}
-}
+} // namespace fts
+} // namespace mongo
diff --git a/src/mongo/db/index/haystack_access_method.cpp b/src/mongo/db/index/haystack_access_method.cpp
index c44aa1924e2..843e59d09bb 100644
--- a/src/mongo/db/index/haystack_access_method.cpp
+++ b/src/mongo/db/index/haystack_access_method.cpp
@@ -108,7 +108,7 @@ void HaystackAccessMethod::searchCommand(OperationContext* opCtx,
BSONObj key = bb.obj();
- unordered_set<RecordId, RecordId::Hasher> thisPass;
+ stdx::unordered_set<RecordId, RecordId::Hasher> thisPass;
auto exec = InternalPlanner::indexScan(opCtx,
@@ -125,7 +125,7 @@ void HaystackAccessMethod::searchCommand(OperationContext* opCtx,
if (hopper.limitReached()) {
break;
}
- pair<unordered_set<RecordId, RecordId::Hasher>::iterator, bool> p =
+ pair<stdx::unordered_set<RecordId, RecordId::Hasher>::iterator, bool> p =
thisPass.insert(loc);
// If a new element was inserted (haven't seen the RecordId before), p.second
// is true.
diff --git a/src/mongo/db/pipeline/value.h b/src/mongo/db/pipeline/value.h
index 9fef5e8fda6..fe937a5440c 100644
--- a/src/mongo/db/pipeline/value.h
+++ b/src/mongo/db/pipeline/value.h
@@ -31,7 +31,6 @@
#include "mongo/base/static_assert.h"
#include "mongo/base/string_data.h"
#include "mongo/db/pipeline/value_internal.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/util/uuid.h"
namespace mongo {
@@ -482,4 +481,4 @@ inline BSONBinData Value::getBinData() const {
auto stringData = _storage.getString();
return BSONBinData(stringData.rawData(), stringData.size(), _storage.binDataType());
}
-};
+} // namespace mongo
diff --git a/src/mongo/db/query/index_tag.cpp b/src/mongo/db/query/index_tag.cpp
index ad598152b78..54209bef197 100644
--- a/src/mongo/db/query/index_tag.cpp
+++ b/src/mongo/db/query/index_tag.cpp
@@ -31,7 +31,7 @@
#include "mongo/db/matcher/expression_array.h"
#include "mongo/db/matcher/expression_tree.h"
#include "mongo/db/query/indexability.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
#include <algorithm>
#include <limits>
@@ -130,9 +130,9 @@ void attachNode(MatchExpression* node,
// Partitions destinations according to the first element of the destination's route. Trims the
// first element off of each destination's route.
-unordered_map<size_t, std::vector<OrPushdownTag::Destination>> partitionChildDestinations(
+stdx::unordered_map<size_t, std::vector<OrPushdownTag::Destination>> partitionChildDestinations(
std::vector<OrPushdownTag::Destination> destinations) {
- unordered_map<size_t, std::vector<OrPushdownTag::Destination>> childDestinations;
+ stdx::unordered_map<size_t, std::vector<OrPushdownTag::Destination>> childDestinations;
for (auto&& dest : destinations) {
invariant(!dest.route.empty());
auto index = dest.route.front();
diff --git a/src/mongo/db/query/plan_enumerator.cpp b/src/mongo/db/query/plan_enumerator.cpp
index 04bc0d93ec8..3b6f4a0f164 100644
--- a/src/mongo/db/query/plan_enumerator.cpp
+++ b/src/mongo/db/query/plan_enumerator.cpp
@@ -264,7 +264,7 @@ PlanEnumerator::PlanEnumerator(const PlanEnumeratorParams& params)
_intersectLimit(params.maxIntersectPerAnd) {}
PlanEnumerator::~PlanEnumerator() {
- typedef unordered_map<MemoID, NodeAssignment*> MemoMap;
+ typedef stdx::unordered_map<MemoID, NodeAssignment*> MemoMap;
for (MemoMap::iterator it = _memo.begin(); it != _memo.end(); ++it) {
delete it->second;
}
@@ -337,7 +337,7 @@ string PlanEnumerator::NodeAssignment::toString() const {
}
PlanEnumerator::MemoID PlanEnumerator::memoIDForNode(MatchExpression* node) {
- unordered_map<MatchExpression*, MemoID>::iterator it = _nodeToId.find(node);
+ stdx::unordered_map<MatchExpression*, MemoID>::iterator it = _nodeToId.find(node);
if (_nodeToId.end() == it) {
error() << "Trying to look up memo entry for node, none found.";
@@ -683,14 +683,14 @@ bool PlanEnumerator::enumerateMandatoryIndex(const IndexToPredMap& idxToFirst,
// Assign any predicates on the non-leading index fields to 'indexAssign' that
// don't violate the intersecting or compounding rules for multikey indexes.
// We do not currently try to assign outside predicates to mandatory indexes.
- const unordered_map<MatchExpression*, OutsidePredRoute> outsidePreds{};
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute> outsidePreds{};
assignMultikeySafePredicates(compIt->second, outsidePreds, &indexAssign);
}
} else {
// Assign any predicates on the leading index field to 'indexAssign' that don't
// violate the intersecting rules for multikey indexes.
// We do not currently try to assign outside predicates to mandatory indexes.
- const unordered_map<MatchExpression*, OutsidePredRoute> outsidePreds{};
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute> outsidePreds{};
assignMultikeySafePredicates(predsOverLeadingField, outsidePreds, &indexAssign);
// Assign the mandatory predicate to 'thisIndex'. Due to how keys are generated for
@@ -794,7 +794,7 @@ bool PlanEnumerator::enumerateMandatoryIndex(const IndexToPredMap& idxToFirst,
}
void PlanEnumerator::assignPredicate(
- const unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
MatchExpression* pred,
size_t position,
OneIndexAssignment* indexAssignment) {
@@ -836,7 +836,7 @@ void PlanEnumerator::enumerateOneIndex(
IndexToPredMap idxToFirst,
IndexToPredMap idxToNotFirst,
const vector<MemoID>& subnodes,
- const unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
AndAssignment* andAssignment) {
// Each choice in the 'andAssignment' will consist of a single subnode to index (an OR or array
// operator) or a OneIndexAssignment. When creating a OneIndexAssignment, we ensure that at
@@ -1319,7 +1319,7 @@ void PlanEnumerator::getMultikeyCompoundablePreds(const vector<MatchExpression*>
//
// As we iterate over the available indexed predicates, we keep track
// of the used prefixes both inside and outside of an $elemMatch context.
- unordered_map<MatchExpression*, set<string>> used;
+ stdx::unordered_map<MatchExpression*, set<string>> used;
// Initialize 'used' with the starting predicates in 'assigned'. Begin by
// initializing the top-level scope with the prefix of the full path.
@@ -1387,7 +1387,7 @@ void PlanEnumerator::getMultikeyCompoundablePreds(const vector<MatchExpression*>
void PlanEnumerator::assignMultikeySafePredicates(
const std::vector<MatchExpression*>& couldAssign,
- const unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
OneIndexAssignment* indexAssignment) {
invariant(indexAssignment);
invariant(indexAssignment->preds.size() == indexAssignment->positions.size());
diff --git a/src/mongo/db/query/plan_enumerator.h b/src/mongo/db/query/plan_enumerator.h
index cd9c88b895c..801ef1a2523 100644
--- a/src/mongo/db/query/plan_enumerator.h
+++ b/src/mongo/db/query/plan_enumerator.h
@@ -36,7 +36,7 @@
#include "mongo/db/query/index_entry.h"
#include "mongo/db/query/index_tag.h"
#include "mongo/db/query/query_knobs.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
@@ -162,7 +162,7 @@ private:
// Maps from indexable predicates that can be pushed into the current node to the route
// through ORs that they have taken to get to this node.
- unordered_map<MatchExpression*, OutsidePredRoute> outsidePreds;
+ stdx::unordered_map<MatchExpression*, OutsidePredRoute> outsidePreds;
};
/**
@@ -404,7 +404,7 @@ private:
*/
void assignMultikeySafePredicates(
const std::vector<MatchExpression*>& couldAssign,
- const unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
OneIndexAssignment* indexAssignment);
/**
@@ -431,7 +431,7 @@ private:
/**
* Output index intersection assignments inside of an AND node.
*/
- typedef unordered_map<IndexID, std::vector<MatchExpression*>> IndexToPredMap;
+ typedef stdx::unordered_map<IndexID, std::vector<MatchExpression*>> IndexToPredMap;
/**
* Generate index intersection assignments given the predicate/index structure in idxToFirst
@@ -448,11 +448,12 @@ private:
* and idxToNotFirst (and the sub-trees in 'subnodes'). Outputs the assignments into
* 'andAssignment'. The predicates in 'outsidePreds' are considered for OrPushdownTags.
*/
- void enumerateOneIndex(IndexToPredMap idxToFirst,
- IndexToPredMap idxToNotFirst,
- const std::vector<MemoID>& subnodes,
- const unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
- AndAssignment* andAssignment);
+ void enumerateOneIndex(
+ IndexToPredMap idxToFirst,
+ IndexToPredMap idxToNotFirst,
+ const std::vector<MemoID>& subnodes,
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
+ AndAssignment* andAssignment);
/**
* Generate single-index assignments for queries which contain mandatory
@@ -501,10 +502,11 @@ private:
* 'outsidePreds'. 'pred' must be able to use the index and be multikey-safe to add to
* 'indexAssignment'.
*/
- void assignPredicate(const unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
- MatchExpression* pred,
- size_t position,
- OneIndexAssignment* indexAssignment);
+ void assignPredicate(
+ const stdx::unordered_map<MatchExpression*, OutsidePredRoute>& outsidePreds,
+ MatchExpression* pred,
+ size_t position,
+ OneIndexAssignment* indexAssignment);
/**
* Sets a flag on all outside pred routes that descend through an $elemMatch object node.
@@ -520,10 +522,10 @@ private:
std::string dumpMemo();
// Map from expression to its MemoID.
- unordered_map<MatchExpression*, MemoID> _nodeToId;
+ stdx::unordered_map<MatchExpression*, MemoID> _nodeToId;
// Map from MemoID to its precomputed solution info.
- unordered_map<MemoID, NodeAssignment*> _memo;
+ stdx::unordered_map<MemoID, NodeAssignment*> _memo;
// If true, there are no further enumeration states, and getNext should return false.
// We could be _done immediately after init if we're unable to output an indexed plan.
diff --git a/src/mongo/db/query/plan_executor.h b/src/mongo/db/query/plan_executor.h
index 182dfa168c5..a85665a8356 100644
--- a/src/mongo/db/query/plan_executor.h
+++ b/src/mongo/db/query/plan_executor.h
@@ -36,7 +36,7 @@
#include "mongo/db/invalidation_type.h"
#include "mongo/db/query/query_solution.h"
#include "mongo/db/storage/snapshot.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -436,13 +436,14 @@ public:
_registrationToken.reset();
}
- boost::optional<Partitioned<unordered_set<PlanExecutor*>>::PartitionId> getRegistrationToken()
- const& {
+ boost::optional<Partitioned<stdx::unordered_set<PlanExecutor*>>::PartitionId>
+ getRegistrationToken() const& {
return _registrationToken;
}
void getRegistrationToken() && = delete;
- void setRegistrationToken(Partitioned<unordered_set<PlanExecutor*>>::PartitionId token) & {
+ void setRegistrationToken(
+ Partitioned<stdx::unordered_set<PlanExecutor*>>::PartitionId token) & {
invariant(!_registrationToken);
_registrationToken = token;
}
@@ -572,7 +573,8 @@ private:
enum { kUsable, kSaved, kDetached, kDisposed } _currentState = kUsable;
// Set if this PlanExecutor is registered with the CursorManager.
- boost::optional<Partitioned<unordered_set<PlanExecutor*>>::PartitionId> _registrationToken;
+ boost::optional<Partitioned<stdx::unordered_set<PlanExecutor*>>::PartitionId>
+ _registrationToken;
bool _everDetachedFromOperationContext = false;
};
diff --git a/src/mongo/db/query/planner_ixselect.cpp b/src/mongo/db/query/planner_ixselect.cpp
index 166a0627ec9..c63f41747a9 100644
--- a/src/mongo/db/query/planner_ixselect.cpp
+++ b/src/mongo/db/query/planner_ixselect.cpp
@@ -140,7 +140,7 @@ static bool boundsGeneratingNodeContainsComparisonToType(MatchExpression* node,
// static
void QueryPlannerIXSelect::getFields(const MatchExpression* node,
string prefix,
- unordered_set<string>* out) {
+ stdx::unordered_set<string>* out) {
// Do not traverse tree beyond a NOR negation node
MatchExpression::MatchType exprtype = node->matchType();
if (exprtype == MatchExpression::NOR) {
@@ -172,7 +172,7 @@ void QueryPlannerIXSelect::getFields(const MatchExpression* node,
}
// static
-void QueryPlannerIXSelect::findRelevantIndices(const unordered_set<string>& fields,
+void QueryPlannerIXSelect::findRelevantIndices(const stdx::unordered_set<string>& fields,
const vector<IndexEntry>& allIndices,
vector<IndexEntry>* out) {
for (size_t i = 0; i < allIndices.size(); ++i) {
diff --git a/src/mongo/db/query/planner_ixselect.h b/src/mongo/db/query/planner_ixselect.h
index 715df2014fe..1a92dd33d6c 100644
--- a/src/mongo/db/query/planner_ixselect.h
+++ b/src/mongo/db/query/planner_ixselect.h
@@ -31,7 +31,7 @@
#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/index_entry.h"
#include "mongo/db/query/query_solution.h"
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -51,13 +51,13 @@ public:
*/
static void getFields(const MatchExpression* node,
std::string prefix,
- unordered_set<std::string>* out);
+ stdx::unordered_set<std::string>* out);
/**
* Find all indices prefixed by fields we have predicates over. Only these indices are
* useful in answering the query.
*/
- static void findRelevantIndices(const unordered_set<std::string>& fields,
+ static void findRelevantIndices(const stdx::unordered_set<std::string>& fields,
const std::vector<IndexEntry>& indices,
std::vector<IndexEntry>* out);
diff --git a/src/mongo/db/query/planner_ixselect_test.cpp b/src/mongo/db/query/planner_ixselect_test.cpp
index a6603f7c681..41d6cb1e912 100644
--- a/src/mongo/db/query/planner_ixselect_test.cpp
+++ b/src/mongo/db/query/planner_ixselect_test.cpp
@@ -88,7 +88,7 @@ string toString(Iter begin, Iter end) {
void testGetFields(const char* query, const char* prefix, const char* expectedFieldsStr) {
BSONObj obj = fromjson(query);
unique_ptr<MatchExpression> expr(parseMatchExpression(obj));
- unordered_set<string> fields;
+ stdx::unordered_set<string> fields;
QueryPlannerIXSelect::getFields(expr.get(), prefix, &fields);
// Verify results
diff --git a/src/mongo/db/query/query_planner.cpp b/src/mongo/db/query/query_planner.cpp
index 53c916ef32d..b9f2e9eb3bd 100644
--- a/src/mongo/db/query/query_planner.cpp
+++ b/src/mongo/db/query/query_planner.cpp
@@ -577,10 +577,11 @@ StatusWith<std::vector<std::unique_ptr<QuerySolution>>> QueryPlanner::plan(
}
// Figure out what fields we care about.
- unordered_set<string> fields;
+ stdx::unordered_set<string> fields;
QueryPlannerIXSelect::getFields(query.root(), "", &fields);
- for (unordered_set<string>::const_iterator it = fields.begin(); it != fields.end(); ++it) {
+ for (stdx::unordered_set<string>::const_iterator it = fields.begin(); it != fields.end();
+ ++it) {
LOG(5) << "Predicate over field '" << *it << "'";
}
diff --git a/src/mongo/db/query/query_settings.h b/src/mongo/db/query/query_settings.h
index 15bd3082f19..c924b23d6f4 100644
--- a/src/mongo/db/query/query_settings.h
+++ b/src/mongo/db/query/query_settings.h
@@ -37,8 +37,8 @@
#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/index_entry.h"
#include "mongo/db/query/plan_cache.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
@@ -143,7 +143,7 @@ public:
private:
// Allowed index entries owned here.
- using AllowedIndexEntryMap = unordered_map<PlanCacheKey, AllowedIndexEntry>;
+ using AllowedIndexEntryMap = stdx::unordered_map<PlanCacheKey, AllowedIndexEntry>;
AllowedIndexEntryMap _allowedIndexEntryMap;
/**
diff --git a/src/mongo/db/repl/check_quorum_for_config_change_test.cpp b/src/mongo/db/repl/check_quorum_for_config_change_test.cpp
index e89721fa708..718ff89772d 100644
--- a/src/mongo/db/repl/check_quorum_for_config_change_test.cpp
+++ b/src/mongo/db/repl/check_quorum_for_config_change_test.cpp
@@ -38,11 +38,11 @@
#include "mongo/db/repl/repl_set_heartbeat_response.h"
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/rpc/metadata/repl_set_metadata.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/thread.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/net/hostandport.h"
@@ -246,7 +246,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckSuccessForFiveNodes) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -299,7 +299,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckFailedDueToOneDownNode) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -359,7 +359,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckFailedDueToSetNameMismatch) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -423,7 +423,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckFailedDueToSetIdMismatch) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
HostAndPort incompatibleHost("h4", 1);
OID unexpectedId = OID::gen();
@@ -502,7 +502,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckFailedDueToInitializedNode) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -568,7 +568,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckFailedDueToInitializedNodeOnlyOneRespo
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -629,7 +629,7 @@ TEST_F(CheckQuorumForInitiate, QuorumCheckFailedDueToNodeWithData) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -683,7 +683,7 @@ TEST_F(CheckQuorumForReconfig, QuorumCheckVetoedDueToHigherConfigVersion) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -738,7 +738,7 @@ TEST_F(CheckQuorumForReconfig, QuorumCheckVetoedDueToIncompatibleSetName) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -804,7 +804,7 @@ TEST_F(CheckQuorumForReconfig, QuorumCheckFailsDueToInsufficientVoters) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -865,7 +865,7 @@ TEST_F(CheckQuorumForReconfig, QuorumCheckFailsDueToNoElectableNodeResponding) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -926,7 +926,7 @@ TEST_F(CheckQuorumForReconfig, QuorumCheckSucceedsWithAsSoonAsPossible) {
startQuorumCheck(rsConfig, myConfigIndex);
const Date_t startDate = getNet()->now();
const int numCommandsExpected = rsConfig.getNumMembers() - 1;
- unordered_set<HostAndPort> seenHosts;
+ stdx::unordered_set<HostAndPort> seenHosts;
getNet()->enterNetwork();
for (int i = 0; i < numCommandsExpected; ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
diff --git a/src/mongo/db/repl/freshness_checker_test.cpp b/src/mongo/db/repl/freshness_checker_test.cpp
index 09dc5c8767c..c95e9b55a6c 100644
--- a/src/mongo/db/repl/freshness_checker_test.cpp
+++ b/src/mongo/db/repl/freshness_checker_test.cpp
@@ -34,10 +34,10 @@
#include "mongo/db/repl/repl_set_config.h"
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/thread.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/mongoutils/str.h"
@@ -444,7 +444,7 @@ TEST_F(FreshnessCheckerTest, ElectNotElectingSelfWeAreNotFreshestManyNodes) {
startTest(Timestamp(10, 0), config, 0, hosts);
const Date_t startDate = getNet()->now();
- unordered_set<HostAndPort> seen;
+ stdx::unordered_set<HostAndPort> seen;
getNet()->enterNetwork();
for (size_t i = 0; i < hosts.size(); ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -507,7 +507,7 @@ TEST_F(FreshnessCheckerTest, ElectNotElectingSelfWeAreNotFreshestOpTimeManyNodes
startTest(Timestamp(10, 0), config, 0, hosts);
const Date_t startDate = getNet()->now();
- unordered_set<HostAndPort> seen;
+ stdx::unordered_set<HostAndPort> seen;
getNet()->enterNetwork();
for (size_t i = 0; i < hosts.size(); ++i) {
@@ -577,7 +577,7 @@ TEST_F(FreshnessCheckerTest, ElectWrongTypeInFreshnessResponseManyNodes) {
startTest(Timestamp(10, 0), config, 0, hosts);
const Date_t startDate = getNet()->now();
- unordered_set<HostAndPort> seen;
+ stdx::unordered_set<HostAndPort> seen;
getNet()->enterNetwork();
for (size_t i = 0; i < hosts.size(); ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -639,7 +639,7 @@ TEST_F(FreshnessCheckerTest, ElectVetoedManyNodes) {
startTest(Timestamp(10, 0), config, 0, hosts);
const Date_t startDate = getNet()->now();
- unordered_set<HostAndPort> seen;
+ stdx::unordered_set<HostAndPort> seen;
getNet()->enterNetwork();
for (size_t i = 0; i < hosts.size(); ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
@@ -704,7 +704,7 @@ TEST_F(FreshnessCheckerTest, ElectVetoedAndTiedFreshnessManyNodes) {
startTest(Timestamp(10, 0), config, 0, hosts);
const Date_t startDate = getNet()->now();
- unordered_set<HostAndPort> seen;
+ stdx::unordered_set<HostAndPort> seen;
getNet()->enterNetwork();
for (size_t i = 0; i < hosts.size(); ++i) {
@@ -780,7 +780,7 @@ TEST_F(FreshnessCheckerTest, ElectManyNodesNotAllRespond) {
startTest(Timestamp(10, 0), config, 0, hosts);
const Date_t startDate = getNet()->now();
- unordered_set<HostAndPort> seen;
+ stdx::unordered_set<HostAndPort> seen;
getNet()->enterNetwork();
for (size_t i = 0; i < hosts.size(); ++i) {
const NetworkInterfaceMock::NetworkOperationIterator noi = getNet()->getNextReadyRequest();
diff --git a/src/mongo/db/repl/is_master_response.cpp b/src/mongo/db/repl/is_master_response.cpp
index 78fe98e45de..417609a9448 100644
--- a/src/mongo/db/repl/is_master_response.cpp
+++ b/src/mongo/db/repl/is_master_response.cpp
@@ -162,7 +162,7 @@ void IsMasterResponse::addToBSON(BSONObjBuilder* builder) const {
builder->appendIntOrLL(kSlaveDelayFieldName, durationCount<Seconds>(_slaveDelay));
if (_tagsSet) {
BSONObjBuilder tags(builder->subobjStart(kTagsFieldName));
- for (unordered_map<std::string, std::string>::const_iterator it = _tags.begin();
+ for (stdx::unordered_map<std::string, std::string>::const_iterator it = _tags.begin();
it != _tags.end();
++it) {
tags.append(it->first, it->second);
diff --git a/src/mongo/db/repl/is_master_response.h b/src/mongo/db/repl/is_master_response.h
index 609e19a2059..aaa186d4f67 100644
--- a/src/mongo/db/repl/is_master_response.h
+++ b/src/mongo/db/repl/is_master_response.h
@@ -34,7 +34,7 @@
#include "mongo/bson/oid.h"
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/optime_with.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/net/hostandport.h"
#include "mongo/util/time_support.h"
@@ -133,7 +133,7 @@ public:
return _slaveDelay;
}
- const unordered_map<std::string, std::string> getTags() const {
+ const stdx::unordered_map<std::string, std::string> getTags() const {
return _tags;
}
@@ -270,7 +270,7 @@ private:
bool _buildIndexesSet;
Seconds _slaveDelay;
bool _slaveDelaySet;
- unordered_map<std::string, std::string> _tags;
+ stdx::unordered_map<std::string, std::string> _tags;
bool _tagsSet;
HostAndPort _me;
bool _meSet;
diff --git a/src/mongo/db/repl/replication_coordinator_impl.h b/src/mongo/db/repl/replication_coordinator_impl.h
index 910a829ac55..7fa8b692907 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.h
+++ b/src/mongo/db/repl/replication_coordinator_impl.h
@@ -47,10 +47,9 @@
#include "mongo/executor/task_executor.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/platform/random.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/concurrency/with_lock.h"
#include "mongo/util/net/hostandport.h"
@@ -1144,7 +1143,7 @@ private:
// every host that sends it a heartbeat request to this set, and also starts
// sending heartbeat requests to that host. This set is cleared whenever
// a node discovers that it is a member of a config.
- unordered_set<HostAndPort> _seedList; // (M)
+ stdx::unordered_set<HostAndPort> _seedList; // (M)
// Back pointer to the ServiceContext that has started the instance.
ServiceContext* const _service; // (S)
diff --git a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp
index 24cf7d5ff34..f6a8ab8cec6 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp
@@ -36,7 +36,6 @@
#include "mongo/db/repl/replication_coordinator_impl.h"
#include "mongo/db/repl/topology_coordinator.h"
#include "mongo/db/repl/vote_requester.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/mutex.h"
#include "mongo/util/log.h"
#include "mongo/util/scopeguard.h"
diff --git a/src/mongo/db/repl/replication_coordinator_impl_test.cpp b/src/mongo/db/repl/replication_coordinator_impl_test.cpp
index d8beeb606d9..6861095c326 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_test.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_test.cpp
@@ -2759,7 +2759,7 @@ TEST_F(ReplCoordTest, IsMaster) {
ASSERT_EQUALS(1U, arbiters.size());
ASSERT_EQUALS(h3, arbiters[0]);
- unordered_map<std::string, std::string> tags = response.getTags();
+ stdx::unordered_map<std::string, std::string> tags = response.getTags();
ASSERT_EQUALS(2U, tags.size());
ASSERT_EQUALS("value1", tags["key1"]);
ASSERT_EQUALS("value2", tags["key2"]);
diff --git a/src/mongo/db/repl/vote_requester.cpp b/src/mongo/db/repl/vote_requester.cpp
index a0c81df3b1d..019c545a544 100644
--- a/src/mongo/db/repl/vote_requester.cpp
+++ b/src/mongo/db/repl/vote_requester.cpp
@@ -166,7 +166,7 @@ VoteRequester::Result VoteRequester::Algorithm::getResult() const {
}
}
-unordered_set<HostAndPort> VoteRequester::Algorithm::getResponders() const {
+stdx::unordered_set<HostAndPort> VoteRequester::Algorithm::getResponders() const {
return _responders;
}
@@ -196,7 +196,7 @@ VoteRequester::Result VoteRequester::getResult() const {
return _algorithm->getResult();
}
-unordered_set<HostAndPort> VoteRequester::getResponders() const {
+stdx::unordered_set<HostAndPort> VoteRequester::getResponders() const {
return _algorithm->getResponders();
}
diff --git a/src/mongo/db/repl/vote_requester.h b/src/mongo/db/repl/vote_requester.h
index db67e41a50b..e6fe1e49efb 100644
--- a/src/mongo/db/repl/vote_requester.h
+++ b/src/mongo/db/repl/vote_requester.h
@@ -37,9 +37,9 @@
#include "mongo/db/repl/repl_set_config.h"
#include "mongo/db/repl/scatter_gather_algorithm.h"
#include "mongo/db/repl/scatter_gather_runner.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/memory.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -77,7 +77,7 @@ public:
/**
* Returns the list of nodes that responded to the VoteRequest command.
*/
- unordered_set<HostAndPort> getResponders() const;
+ stdx::unordered_set<HostAndPort> getResponders() const;
private:
enum class PrimaryVote { Pending, Yes, No };
@@ -88,7 +88,7 @@ public:
bool _dryRun = false; // this bool indicates this is a mock election when true
const OpTime _lastDurableOpTime;
std::vector<HostAndPort> _targets;
- unordered_set<HostAndPort> _responders;
+ stdx::unordered_set<HostAndPort> _responders;
bool _staleTerm = false;
long long _responsesProcessed = 0;
long long _votes = 1;
@@ -122,7 +122,7 @@ public:
void cancel();
Result getResult() const;
- unordered_set<HostAndPort> getResponders() const;
+ stdx::unordered_set<HostAndPort> getResponders() const;
private:
std::shared_ptr<Algorithm> _algorithm;
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h
index 775fd60d0e4..7ef549cac20 100644
--- a/src/mongo/db/service_context.h
+++ b/src/mongo/db/service_context.h
@@ -34,11 +34,11 @@
#include "mongo/db/logical_session_id.h"
#include "mongo/db/storage/storage_engine.h"
#include "mongo/platform/atomic_word.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/mutex.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/transport/service_executor.h"
#include "mongo/transport/session.h"
#include "mongo/util/clock_source.h"
@@ -158,7 +158,7 @@ public:
virtual void onDestroyOperationContext(OperationContext* opCtx) = 0;
};
- using ClientSet = unordered_set<Client*>;
+ using ClientSet = stdx::unordered_set<Client*>;
/**
* Cursor for enumerating the live Client objects belonging to a ServiceContext.
diff --git a/src/mongo/db/storage/mmap_v1/diskloc.h b/src/mongo/db/storage/mmap_v1/diskloc.h
index 8d20056ae56..24ff75c7609 100644
--- a/src/mongo/db/storage/mmap_v1/diskloc.h
+++ b/src/mongo/db/storage/mmap_v1/diskloc.h
@@ -39,7 +39,6 @@
#include "mongo/db/jsobj.h"
#include "mongo/db/record_id.h"
-#include "mongo/platform/unordered_set.h"
namespace mongo {
diff --git a/src/mongo/db/storage/mmap_v1/record_store_v1_base.h b/src/mongo/db/storage/mmap_v1/record_store_v1_base.h
index 3dd86cfc0a8..af3e51a4661 100644
--- a/src/mongo/db/storage/mmap_v1/record_store_v1_base.h
+++ b/src/mongo/db/storage/mmap_v1/record_store_v1_base.h
@@ -1,5 +1,3 @@
-// record_store_v1_base.h
-
/**
* Copyright (C) 2013-2014 MongoDB Inc.
*
@@ -30,7 +28,7 @@
#pragma once
-#include "mongo/platform/unordered_set.h"
+#include "mongo/stdx/unordered_set.h"
#include "mongo/util/concurrency/spin_lock.h"
#include "mongo/db/storage/mmap_v1/diskloc.h"
@@ -146,7 +144,8 @@ public:
private:
SpinLock _mutex;
- typedef unordered_set<SavedCursor*> SavedCursorSet; // SavedCursor pointers not owned here
+ typedef stdx::unordered_set<SavedCursor*>
+ SavedCursorSet; // SavedCursor pointers not owned here
SavedCursorSet _cursors;
};
@@ -358,4 +357,4 @@ private:
const RecordStoreV1Base* _rs;
bool _forward;
};
-}
+} // namespace mongo
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
index d10f03e474a..31aa457f507 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.cpp
@@ -1,5 +1,3 @@
-// wiredtiger_util.cpp
-
/**
* Copyright (C) 2014 MongoDB Inc.
*
@@ -42,7 +40,6 @@
#include "mongo/db/concurrency/write_conflict_exception.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_recovery_unit.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_session_cache.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/update/modifier_table.cpp b/src/mongo/db/update/modifier_table.cpp
index 95dfe4146f1..02e4e6f13e6 100644
--- a/src/mongo/db/update/modifier_table.cpp
+++ b/src/mongo/db/update/modifier_table.cpp
@@ -47,7 +47,6 @@
#include "mongo/db/update/rename_node.h"
#include "mongo/db/update/set_node.h"
#include "mongo/db/update/unset_node.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/memory.h"
namespace mongo {
diff --git a/src/mongo/dbtests/mock/mock_conn_registry.h b/src/mongo/dbtests/mock/mock_conn_registry.h
index d72a702aea5..7f4a7b849da 100644
--- a/src/mongo/dbtests/mock/mock_conn_registry.h
+++ b/src/mongo/dbtests/mock/mock_conn_registry.h
@@ -28,12 +28,11 @@
#pragma once
-
#include "mongo/base/status.h"
#include "mongo/client/dbclientinterface.h"
#include "mongo/dbtests/mock/mock_dbclient_connection.h"
#include "mongo/dbtests/mock/mock_remote_db_server.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/mutex.h"
namespace mongo {
@@ -116,6 +115,6 @@ private:
// protects _registry
stdx::mutex _registryMutex;
- unordered_map<std::string, MockRemoteDBServer*> _registry;
+ stdx::unordered_map<std::string, MockRemoteDBServer*> _registry;
};
-}
+} // namespace mongo
diff --git a/src/mongo/dbtests/mock/mock_remote_db_server.h b/src/mongo/dbtests/mock/mock_remote_db_server.h
index 743c26a3083..e17f69bfd63 100644
--- a/src/mongo/dbtests/mock/mock_remote_db_server.h
+++ b/src/mongo/dbtests/mock/mock_remote_db_server.h
@@ -32,8 +32,8 @@
#include "mongo/client/dbclientinterface.h"
#include "mongo/db/jsobj.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/rpc/unique_message.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/spin_lock.h"
namespace mongo {
@@ -207,8 +207,8 @@ private:
*/
void checkIfUp(InstanceID id) const;
- typedef unordered_map<std::string, std::shared_ptr<CircularBSONIterator>> CmdToReplyObj;
- typedef unordered_map<std::string, std::vector<BSONObj>> MockDataMgr;
+ typedef stdx::unordered_map<std::string, std::shared_ptr<CircularBSONIterator>> CmdToReplyObj;
+ typedef stdx::unordered_map<std::string, std::vector<BSONObj>> MockDataMgr;
bool _isRunning;
@@ -234,4 +234,4 @@ private:
// protects this entire instance
mutable mongo::SpinLock _lock;
};
-}
+} // namespace mongo
diff --git a/src/mongo/dbtests/query_stage_and.cpp b/src/mongo/dbtests/query_stage_and.cpp
index 3a3229347a7..7f6404cbcac 100644
--- a/src/mongo/dbtests/query_stage_and.cpp
+++ b/src/mongo/dbtests/query_stage_and.cpp
@@ -235,7 +235,7 @@ public:
ASSERT_LESS_THAN(memUsageAfter, memUsageBefore);
// And expect to find foo==15 it flagged for review.
- const unordered_set<WorkingSetID>& flagged = ws.getFlagged();
+ const stdx::unordered_set<WorkingSetID>& flagged = ws.getFlagged();
ASSERT_EQUALS(size_t(1), flagged.size());
// Expect to find the right value of foo in the flagged item.
@@ -316,7 +316,7 @@ public:
PlanStage::StageState status = ah->work(&id);
ASSERT_EQUALS(PlanStage::NEED_TIME, status);
- const unordered_set<WorkingSetID>& flagged = ws.getFlagged();
+ const stdx::unordered_set<WorkingSetID>& flagged = ws.getFlagged();
ASSERT_EQUALS(size_t(0), flagged.size());
// "delete" deletedObj (by invalidating the RecordId of the obj that matches it).
diff --git a/src/mongo/executor/task_executor_test_common.cpp b/src/mongo/executor/task_executor_test_common.cpp
index acc95e57754..1d04675ae03 100644
--- a/src/mongo/executor/task_executor_test_common.cpp
+++ b/src/mongo/executor/task_executor_test_common.cpp
@@ -40,9 +40,9 @@
#include "mongo/executor/network_interface_mock.h"
#include "mongo/executor/task_executor.h"
#include "mongo/executor/task_executor_test_fixture.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/thread.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/clock_source_mock.h"
#include "mongo/util/log.h"
@@ -71,7 +71,7 @@ private:
using ExecutorTestCaseFactory =
stdx::function<std::unique_ptr<CommonTaskExecutorTestFixture>(ExecutorFactory)>;
-using ExecutorTestCaseMap = unordered_map<std::string, ExecutorTestCaseFactory>;
+using ExecutorTestCaseMap = stdx::unordered_map<std::string, ExecutorTestCaseFactory>;
static ExecutorTestCaseMap& executorTestCaseRegistry() {
static ExecutorTestCaseMap registry;
diff --git a/src/mongo/logger/log_manager.h b/src/mongo/logger/log_manager.h
index dea99dc047c..2a77b59a3c7 100644
--- a/src/mongo/logger/log_manager.h
+++ b/src/mongo/logger/log_manager.h
@@ -32,7 +32,7 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/logger/component_message_log_domain.h"
#include "mongo/logger/rotatable_file_writer.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
namespace logger {
@@ -62,7 +62,7 @@ public:
MessageLogDomain* getNamedDomain(const std::string& name);
private:
- typedef unordered_map<std::string, MessageLogDomain*> DomainsByNameMap;
+ typedef stdx::unordered_map<std::string, MessageLogDomain*> DomainsByNameMap;
DomainsByNameMap _domains;
ComponentMessageLogDomain _globalDomain;
diff --git a/src/mongo/logger/rotatable_file_manager.h b/src/mongo/logger/rotatable_file_manager.h
index 78af3c3379a..5438a31e545 100644
--- a/src/mongo/logger/rotatable_file_manager.h
+++ b/src/mongo/logger/rotatable_file_manager.h
@@ -35,7 +35,7 @@
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/logger/rotatable_file_writer.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
namespace logger {
@@ -83,7 +83,7 @@ public:
FileNameStatusPairVector rotateAll(bool renameFiles, const std::string& renameTargetSuffix);
private:
- typedef unordered_map<std::string, RotatableFileWriter*> WriterByNameMap;
+ typedef stdx::unordered_map<std::string, RotatableFileWriter*> WriterByNameMap;
WriterByNameMap _writers;
};
diff --git a/src/mongo/platform/unordered_map.h b/src/mongo/platform/unordered_map.h
deleted file mode 100644
index ee3e80ea387..00000000000
--- a/src/mongo/platform/unordered_map.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright 2012 10gen Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * As a special exception, the copyright holders give permission to link the
- * code of portions of this program with the OpenSSL library under certain
- * conditions as described in each individual source file and distribute
- * linked combinations including the program with the OpenSSL library. You
- * must comply with the GNU Affero General Public License in all respects
- * for all of the code used other than as permitted herein. If you modify
- * file(s) with this exception, you may extend this exception to your
- * version of the file(s), but you are not obligated to do so. If you do not
- * wish to do so, delete this exception statement from your version. If you
- * delete this exception statement from all source files in the program,
- * then also delete it in the license file.
- */
-
-#pragma once
-
-#include "mongo/stdx/unordered_map.h"
-
-namespace mongo {
-
-using stdx::unordered_map;
-
-} // namespace mongo
diff --git a/src/mongo/platform/unordered_set.h b/src/mongo/platform/unordered_set.h
deleted file mode 100644
index 391ab1b7019..00000000000
--- a/src/mongo/platform/unordered_set.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/* Copyright 2012 10gen Inc.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License, version 3,
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
- * As a special exception, the copyright holders give permission to link the
- * code of portions of this program with the OpenSSL library under certain
- * conditions as described in each individual source file and distribute
- * linked combinations including the program with the OpenSSL library. You
- * must comply with the GNU Affero General Public License in all respects
- * for all of the code used other than as permitted herein. If you modify
- * file(s) with this exception, you may extend this exception to your
- * version of the file(s), but you are not obligated to do so. If you do not
- * wish to do so, delete this exception statement from your version. If you
- * delete this exception statement from all source files in the program,
- * then also delete it in the license file.
- */
-
-#pragma once
-
-#include "mongo/stdx/unordered_set.h"
-
-namespace mongo {
-
-using stdx::unordered_set;
-
-} // namespace mongo
diff --git a/src/mongo/s/write_ops/batch_write_op.h b/src/mongo/s/write_ops/batch_write_op.h
index 2b91136d5cd..6b1856e7a3d 100644
--- a/src/mongo/s/write_ops/batch_write_op.h
+++ b/src/mongo/s/write_ops/batch_write_op.h
@@ -36,13 +36,13 @@
#include "mongo/base/owned_pointer_vector.h"
#include "mongo/base/status.h"
#include "mongo/db/logical_session_id.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/rpc/write_concern_error_detail.h"
#include "mongo/s/ns_targeter.h"
#include "mongo/s/write_ops/batched_command_request.h"
#include "mongo/s/write_ops/batched_command_response.h"
#include "mongo/s/write_ops/write_error_detail.h"
#include "mongo/s/write_ops/write_op.h"
+#include "mongo/stdx/unordered_map.h"
namespace mongo {
diff --git a/src/mongo/scripting/deadline_monitor.h b/src/mongo/scripting/deadline_monitor.h
index 9081d7366e6..9e5ae2a37dc 100644
--- a/src/mongo/scripting/deadline_monitor.h
+++ b/src/mongo/scripting/deadline_monitor.h
@@ -31,10 +31,10 @@
#include "mongo/base/disallow_copying.h"
#include "mongo/platform/atomic_word.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/thread.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/concurrency/idle_thread_block.h"
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/time_support.h"
diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp
index e813e7771e7..364f89e7b25 100644
--- a/src/mongo/scripting/engine.cpp
+++ b/src/mongo/scripting/engine.cpp
@@ -1,5 +1,3 @@
-// engine.cpp
-
/* Copyright 2009 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
@@ -40,7 +38,6 @@
#include "mongo/client/dbclientinterface.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/service_context.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/scripting/dbdirectclient_factory.h"
#include "mongo/util/fail_point_service.h"
#include "mongo/util/file.h"
@@ -611,4 +608,4 @@ const char* jsSkipWhiteSpace(const char* raw) {
}
return raw;
}
-}
+} // namespace mongo
diff --git a/src/mongo/shell/shell_utils_launcher.h b/src/mongo/shell/shell_utils_launcher.h
index 4a5df16c5ca..0b79180fc19 100644
--- a/src/mongo/shell/shell_utils_launcher.h
+++ b/src/mongo/shell/shell_utils_launcher.h
@@ -1,4 +1,3 @@
-// mongo/shell/shell_utils_launcher.h
/*
* Copyright 2010 10gen Inc.
*
@@ -38,10 +37,10 @@
#include "mongo/bson/bsonobj.h"
#include "mongo/platform/process_id.h"
-#include "mongo/platform/unordered_map.h"
-#include "mongo/platform/unordered_set.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/thread.h"
+#include "mongo/stdx/unordered_map.h"
+#include "mongo/stdx/unordered_set.h"
namespace mongo {
@@ -142,5 +141,5 @@ private:
ProcessId _pid;
std::string _name;
};
-}
-}
+} // namespace shell_utils
+} // namespace mongo
diff --git a/src/mongo/util/concurrency/thread_pool_test_common.cpp b/src/mongo/util/concurrency/thread_pool_test_common.cpp
index ea63df2df83..05e60e66fb1 100644
--- a/src/mongo/util/concurrency/thread_pool_test_common.cpp
+++ b/src/mongo/util/concurrency/thread_pool_test_common.cpp
@@ -61,7 +61,7 @@ private:
using ThreadPoolTestCaseFactory =
stdx::function<std::unique_ptr<::mongo::unittest::Test>(ThreadPoolFactory)>;
-using ThreadPoolTestCaseMap = unordered_map<std::string, ThreadPoolTestCaseFactory>;
+using ThreadPoolTestCaseMap = stdx::unordered_map<std::string, ThreadPoolTestCaseFactory>;
static ThreadPoolTestCaseMap& threadPoolTestCaseRegistry() {
static ThreadPoolTestCaseMap registry;
diff --git a/src/mongo/util/fail_point_registry.h b/src/mongo/util/fail_point_registry.h
index 0555a96467b..4e3c1abdcc1 100644
--- a/src/mongo/util/fail_point_registry.h
+++ b/src/mongo/util/fail_point_registry.h
@@ -33,7 +33,7 @@
#pragma once
#include "mongo/base/status.h"
-#include "mongo/platform/unordered_map.h"
+#include "mongo/stdx/unordered_map.h"
#include "mongo/util/fail_point.h"
namespace mongo {
@@ -73,6 +73,6 @@ public:
private:
bool _frozen;
- unordered_map<std::string, FailPoint*> _fpMap;
+ stdx::unordered_map<std::string, FailPoint*> _fpMap;
};
-}
+} // namespace mongo
diff --git a/src/mongo/util/string_map_test.cpp b/src/mongo/util/string_map_test.cpp
index 5c0374e3cec..25bf6978c83 100644
--- a/src/mongo/util/string_map_test.cpp
+++ b/src/mongo/util/string_map_test.cpp
@@ -1,5 +1,3 @@
-// string_map_test.cpp
-
/* Copyright 2012 10gen Inc.
*
* This program is free software: you can redistribute it and/or modify
@@ -32,7 +30,6 @@
#include "mongo/unittest/unittest.h"
#include "mongo/platform/random.h"
-#include "mongo/platform/unordered_map.h"
#include "mongo/util/log.h"
#include "mongo/util/string_map.h"
#include "mongo/util/timer.h"