summaryrefslogtreecommitdiff
path: root/src/mongo/db
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-03-27 12:21:37 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-03-28 10:13:21 -0400
commitf922827d45ce752e148185dfa3a785f7c9cf29fd (patch)
treeb3ae7fdba18d9ef3384af6e0d009d091e5df14a3 /src/mongo/db
parentf2f422d92b639edba0a10d40a43803723cb15baf (diff)
downloadmongo-f922827d45ce752e148185dfa3a785f7c9cf29fd.tar.gz
SERVER-40357 expand all calls to MONGO_DISALLOW_COPYING
produced by: hits="$(git grep -n MONGO_DISALLOW_COPYING | cut -d: -f1 )" for f in "$hits"; do sed -i.orig ' s/^\( *\)MONGO_DISALLOW_COPYING(\(.*\));/\1\2(const \2\&) = delete;\n\1\2\& operator=(const \2\&) = delete;/; ' $f done
Diffstat (limited to 'src/mongo/db')
-rw-r--r--src/mongo/db/auth/auth_op_observer.h3
-rw-r--r--src/mongo/db/auth/authentication_session.h4
-rw-r--r--src/mongo/db/auth/authorization_manager.h1
-rw-r--r--src/mongo/db/auth/authorization_manager_impl.cpp3
-rw-r--r--src/mongo/db/auth/authorization_manager_impl.h1
-rw-r--r--src/mongo/db/auth/authorization_session_for_test.h3
-rw-r--r--src/mongo/db/auth/authorization_session_impl.h1
-rw-r--r--src/mongo/db/auth/authz_manager_external_state.h1
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_d.h4
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_local.h4
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_mock.h4
-rw-r--r--src/mongo/db/auth/authz_manager_external_state_s.h4
-rw-r--r--src/mongo/db/auth/authz_session_external_state.h1
-rw-r--r--src/mongo/db/auth/authz_session_external_state_d.h4
-rw-r--r--src/mongo/db/auth/authz_session_external_state_mock.h1
-rw-r--r--src/mongo/db/auth/authz_session_external_state_s.h4
-rw-r--r--src/mongo/db/auth/authz_session_external_state_server_common.h5
-rw-r--r--src/mongo/db/auth/impersonation_session.h4
-rw-r--r--src/mongo/db/auth/privilege_parser.h6
-rw-r--r--src/mongo/db/auth/role_name.h7
-rw-r--r--src/mongo/db/auth/sasl_scram_server_conversation.cpp1
-rw-r--r--src/mongo/db/auth/user.h4
-rw-r--r--src/mongo/db/auth/user_document_parser.h4
-rw-r--r--src/mongo/db/auth/user_management_commands_parser.h1
-rw-r--r--src/mongo/db/auth/user_name.h1
-rw-r--r--src/mongo/db/auth/user_set.cpp3
-rw-r--r--src/mongo/db/auth/user_set.h4
-rw-r--r--src/mongo/db/background.cpp4
-rw-r--r--src/mongo/db/background.h4
-rw-r--r--src/mongo/db/catalog/document_validation.h4
-rw-r--r--src/mongo/db/catalog/health_log.h4
-rw-r--r--src/mongo/db/catalog/index_builds_manager.h4
-rw-r--r--src/mongo/db/catalog/index_catalog_entry_impl.h3
-rw-r--r--src/mongo/db/catalog/index_catalog_impl.h3
-rw-r--r--src/mongo/db/catalog/multi_index_block.h4
-rw-r--r--src/mongo/db/catalog/namespace_uuid_cache.h4
-rw-r--r--src/mongo/db/catalog/uuid_catalog.h4
-rw-r--r--src/mongo/db/catalog_raii.h12
-rw-r--r--src/mongo/db/client.h1
-rw-r--r--src/mongo/db/clientcursor.h6
-rw-r--r--src/mongo/db/cloner.h4
-rw-r--r--src/mongo/db/collection_index_builds_tracker.h4
-rw-r--r--src/mongo/db/collection_index_usage_tracker.h4
-rw-r--r--src/mongo/db/commands/current_op.cpp3
-rw-r--r--src/mongo/db/commands/end_sessions_command.cpp3
-rw-r--r--src/mongo/db/commands/getmore_cmd.cpp1
-rw-r--r--src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp3
-rw-r--r--src/mongo/db/commands/kill_all_sessions_command.cpp3
-rw-r--r--src/mongo/db/commands/kill_sessions_command.cpp3
-rw-r--r--src/mongo/db/commands/killcursors_cmd.cpp4
-rw-r--r--src/mongo/db/commands/list_collections_filter.h4
-rw-r--r--src/mongo/db/commands/mr.h12
-rw-r--r--src/mongo/db/commands/reap_logical_session_cache_now.cpp3
-rw-r--r--src/mongo/db/commands/refresh_logical_session_cache_now.cpp4
-rw-r--r--src/mongo/db/commands/refresh_sessions_command.cpp3
-rw-r--r--src/mongo/db/commands/refresh_sessions_command_internal.cpp3
-rw-r--r--src/mongo/db/commands/start_session_command.cpp3
-rw-r--r--src/mongo/db/concurrency/d_concurrency.h15
-rw-r--r--src/mongo/db/concurrency/deferred_writer.h3
-rw-r--r--src/mongo/db/concurrency/lock_manager.h3
-rw-r--r--src/mongo/db/concurrency/lock_state.cpp3
-rw-r--r--src/mongo/db/concurrency/lock_state.h3
-rw-r--r--src/mongo/db/concurrency/locker.h8
-rw-r--r--src/mongo/db/concurrency/replication_state_transition_lock_guard.h5
-rw-r--r--src/mongo/db/curop.cpp4
-rw-r--r--src/mongo/db/curop.h4
-rw-r--r--src/mongo/db/database_index_builds_tracker.h1
-rw-r--r--src/mongo/db/db_raii.h12
-rw-r--r--src/mongo/db/dbdirectclient.cpp3
-rw-r--r--src/mongo/db/dbmessage.h3
-rw-r--r--src/mongo/db/exec/delete.h3
-rw-r--r--src/mongo/db/exec/plan_stats.h4
-rw-r--r--src/mongo/db/exec/scoped_timer.h4
-rw-r--r--src/mongo/db/exec/subplan.h3
-rw-r--r--src/mongo/db/exec/update_stage.h3
-rw-r--r--src/mongo/db/exec/working_set.h10
-rw-r--r--src/mongo/db/field_ref_set.h4
-rw-r--r--src/mongo/db/free_mon/free_mon_op_observer.h4
-rw-r--r--src/mongo/db/ftdc/block_compressor.h4
-rw-r--r--src/mongo/db/ftdc/collector.h7
-rw-r--r--src/mongo/db/ftdc/compressor.h4
-rw-r--r--src/mongo/db/ftdc/controller.h4
-rw-r--r--src/mongo/db/ftdc/decompressor.h4
-rw-r--r--src/mongo/db/ftdc/file_manager.h4
-rw-r--r--src/mongo/db/ftdc/file_reader.h4
-rw-r--r--src/mongo/db/ftdc/file_writer.h3
-rw-r--r--src/mongo/db/fts/fts_basic_phrase_matcher.h4
-rw-r--r--src/mongo/db/fts/fts_basic_tokenizer.h4
-rw-r--r--src/mongo/db/fts/fts_language.h3
-rw-r--r--src/mongo/db/fts/fts_matcher.h3
-rw-r--r--src/mongo/db/fts/fts_query_parser.h4
-rw-r--r--src/mongo/db/fts/fts_tokenizer.h1
-rw-r--r--src/mongo/db/fts/fts_unicode_phrase_matcher.h4
-rw-r--r--src/mongo/db/fts/fts_unicode_tokenizer.h4
-rw-r--r--src/mongo/db/fts/stemmer.h3
-rw-r--r--src/mongo/db/fts/stop_words.h3
-rw-r--r--src/mongo/db/fts/tokenizer.h3
-rw-r--r--src/mongo/db/geo/geometry_container.h4
-rw-r--r--src/mongo/db/hasher.cpp3
-rw-r--r--src/mongo/db/hasher.h4
-rw-r--r--src/mongo/db/index/duplicate_key_tracker.h4
-rw-r--r--src/mongo/db/index/index_access_method.h7
-rw-r--r--src/mongo/db/index_builds_coordinator.h7
-rw-r--r--src/mongo/db/index_builds_coordinator_mongod.h4
-rw-r--r--src/mongo/db/matcher/expression.h4
-rw-r--r--src/mongo/db/matcher/expression_geo.h6
-rw-r--r--src/mongo/db/matcher/matcher.h4
-rw-r--r--src/mongo/db/op_observer.h1
-rw-r--r--src/mongo/db/op_observer_impl.h3
-rw-r--r--src/mongo/db/op_observer_registry.h3
-rw-r--r--src/mongo/db/operation_context.h7
-rw-r--r--src/mongo/db/ops/delete_request.h4
-rw-r--r--src/mongo/db/ops/parsed_delete.h4
-rw-r--r--src/mongo/db/ops/parsed_update.h4
-rw-r--r--src/mongo/db/pipeline/document.h3
-rw-r--r--src/mongo/db/pipeline/document_internal.h3
-rw-r--r--src/mongo/db/pipeline/document_source_change_stream_transform.h3
-rw-r--r--src/mongo/db/pipeline/sequential_document_cache.h3
-rw-r--r--src/mongo/db/query/collation/collation_index_key.cpp4
-rw-r--r--src/mongo/db/query/collation/collator_factory_interface.h4
-rw-r--r--src/mongo/db/query/collation/collator_interface.h4
-rw-r--r--src/mongo/db/query/cursor_response.h7
-rw-r--r--src/mongo/db/query/datetime/date_time_support.h4
-rw-r--r--src/mongo/db/query/plan_cache.h9
-rw-r--r--src/mongo/db/query/plan_cache_indexability.h4
-rw-r--r--src/mongo/db/query/plan_enumerator.h4
-rw-r--r--src/mongo/db/query/plan_executor_impl.h4
-rw-r--r--src/mongo/db/query/query_settings.h7
-rw-r--r--src/mongo/db/query/query_solution.h6
-rw-r--r--src/mongo/db/repl/abstract_async_component.h4
-rw-r--r--src/mongo/db/repl/abstract_oplog_fetcher.h4
-rw-r--r--src/mongo/db/repl/abstract_oplog_fetcher_test.cpp3
-rw-r--r--src/mongo/db/repl/abstract_oplog_fetcher_test_fixture.h4
-rw-r--r--src/mongo/db/repl/applier_helpers.h4
-rw-r--r--src/mongo/db/repl/bgsync.h4
-rw-r--r--src/mongo/db/repl/check_quorum_for_config_change.cpp1
-rw-r--r--src/mongo/db/repl/check_quorum_for_config_change.h3
-rw-r--r--src/mongo/db/repl/collection_bulk_loader_impl.h4
-rw-r--r--src/mongo/db/repl/collection_cloner.h4
-rw-r--r--src/mongo/db/repl/collection_cloner_test.cpp6
-rw-r--r--src/mongo/db/repl/data_replicator_external_state.h4
-rw-r--r--src/mongo/db/repl/data_replicator_external_state_mock.cpp3
-rw-r--r--src/mongo/db/repl/database_cloner.h4
-rw-r--r--src/mongo/db/repl/databases_cloner.h1
-rw-r--r--src/mongo/db/repl/databases_cloner_test.cpp3
-rw-r--r--src/mongo/db/repl/drop_pending_collection_reaper.h4
-rw-r--r--src/mongo/db/repl/initial_syncer.h3
-rw-r--r--src/mongo/db/repl/initial_syncer_test.cpp3
-rw-r--r--src/mongo/db/repl/multiapplier.h4
-rw-r--r--src/mongo/db/repl/multiapplier_test.cpp3
-rw-r--r--src/mongo/db/repl/noop_writer.cpp3
-rw-r--r--src/mongo/db/repl/noop_writer.h3
-rw-r--r--src/mongo/db/repl/oplog.cpp3
-rw-r--r--src/mongo/db/repl/oplog_applier.h4
-rw-r--r--src/mongo/db/repl/oplog_applier_impl.h4
-rw-r--r--src/mongo/db/repl/oplog_buffer.h4
-rw-r--r--src/mongo/db/repl/oplog_buffer_proxy.h4
-rw-r--r--src/mongo/db/repl/oplog_buffer_proxy_test.cpp4
-rw-r--r--src/mongo/db/repl/oplog_fetcher.h4
-rw-r--r--src/mongo/db/repl/oplog_interface.h7
-rw-r--r--src/mongo/db/repl/oplog_interface_mock.h3
-rw-r--r--src/mongo/db/repl/replication_consistency_markers.h4
-rw-r--r--src/mongo/db/repl/replication_consistency_markers_impl.h4
-rw-r--r--src/mongo/db/repl/replication_consistency_markers_mock.h4
-rw-r--r--src/mongo/db/repl/replication_coordinator.h4
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state.h5
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_impl.h6
-rw-r--r--src/mongo/db/repl/replication_coordinator_external_state_mock.h6
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.cpp3
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl.h3
-rw-r--r--src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp7
-rw-r--r--src/mongo/db/repl/replication_coordinator_mock.h3
-rw-r--r--src/mongo/db/repl/replication_process.h4
-rw-r--r--src/mongo/db/repl/replication_recovery.h4
-rw-r--r--src/mongo/db/repl/replication_recovery_mock.h4
-rw-r--r--src/mongo/db/repl/reporter.h3
-rw-r--r--src/mongo/db/repl/roll_back_local_operations.h4
-rw-r--r--src/mongo/db/repl/rollback.h4
-rw-r--r--src/mongo/db/repl/rollback_checker.h3
-rw-r--r--src/mongo/db/repl/rollback_source.h4
-rw-r--r--src/mongo/db/repl/scatter_gather_runner.h4
-rw-r--r--src/mongo/db/repl/storage_interface.h4
-rw-r--r--src/mongo/db/repl/storage_interface_impl.h4
-rw-r--r--src/mongo/db/repl/storage_interface_mock.h7
-rw-r--r--src/mongo/db/repl/sync_source_feedback.h4
-rw-r--r--src/mongo/db/repl/sync_source_selector.h4
-rw-r--r--src/mongo/db/repl/sync_source_selector_mock.h4
-rw-r--r--src/mongo/db/repl/sync_tail.cpp3
-rw-r--r--src/mongo/db/repl/task_runner.h4
-rw-r--r--src/mongo/db/repl/timestamp_block.h4
-rw-r--r--src/mongo/db/repl/topology_coordinator.h4
-rw-r--r--src/mongo/db/repl/vote_requester.h4
-rw-r--r--src/mongo/db/retryable_writes_stats.h3
-rw-r--r--src/mongo/db/s/active_migrations_registry.h10
-rw-r--r--src/mongo/db/s/active_move_primaries_registry.h7
-rw-r--r--src/mongo/db/s/active_shard_collection_registry.h7
-rw-r--r--src/mongo/db/s/balancer/balancer.h4
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy.h4
-rw-r--r--src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp3
-rw-r--r--src/mongo/db/s/balancer/balancer_policy.h4
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics.h4
-rw-r--r--src/mongo/db/s/balancer/migration_manager.h4
-rw-r--r--src/mongo/db/s/balancer/scoped_migration_request.h3
-rw-r--r--src/mongo/db/s/catalog_cache_loader_mock.h3
-rw-r--r--src/mongo/db/s/chunk_split_state_driver.h4
-rw-r--r--src/mongo/db/s/chunk_splitter.h3
-rw-r--r--src/mongo/db/s/collection_range_deleter.h4
-rw-r--r--src/mongo/db/s/collection_sharding_runtime.h7
-rw-r--r--src/mongo/db/s/collection_sharding_state.cpp3
-rw-r--r--src/mongo/db/s/collection_sharding_state.h7
-rw-r--r--src/mongo/db/s/config/namespace_serializer.h3
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager.h4
-rw-r--r--src/mongo/db/s/config_server_op_observer.h4
-rw-r--r--src/mongo/db/s/database_sharding_state.h4
-rw-r--r--src/mongo/db/s/metadata_manager.h7
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source.h4
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source_legacy.h3
-rw-r--r--src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp3
-rw-r--r--src/mongo/db/s/migration_destination_manager.h4
-rw-r--r--src/mongo/db/s/migration_session_id.h1
-rw-r--r--src/mongo/db/s/migration_source_manager.h4
-rw-r--r--src/mongo/db/s/move_primary_source_manager.h4
-rw-r--r--src/mongo/db/s/namespace_metadata_change_notifications.h8
-rw-r--r--src/mongo/db/s/operation_sharding_state.h4
-rw-r--r--src/mongo/db/s/periodic_balancer_config_refresher.h4
-rw-r--r--src/mongo/db/s/scoped_operation_completion_sharding_actions.h6
-rw-r--r--src/mongo/db/s/session_catalog_migration_destination.h5
-rw-r--r--src/mongo/db/s/session_catalog_migration_source.h4
-rw-r--r--src/mongo/db/s/shard_identity_rollback_notifier.h4
-rw-r--r--src/mongo/db/s/shard_server_catalog_cache_loader.h9
-rw-r--r--src/mongo/db/s/shard_server_op_observer.h4
-rw-r--r--src/mongo/db/s/sharded_connection_info.h4
-rw-r--r--src/mongo/db/s/sharding_initialization_mongod.h4
-rw-r--r--src/mongo/db/s/sharding_migration_critical_section.h4
-rw-r--r--src/mongo/db/s/sharding_state.h4
-rw-r--r--src/mongo/db/s/sharding_state_lock.h1
-rw-r--r--src/mongo/db/s/transaction_coordinator.h3
-rw-r--r--src/mongo/db/s/transaction_coordinator_catalog.h4
-rw-r--r--src/mongo/db/s/transaction_coordinator_driver.h3
-rw-r--r--src/mongo/db/s/transaction_coordinator_service.h4
-rw-r--r--src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp3
-rw-r--r--src/mongo/db/server_transactions_metrics.h3
-rw-r--r--src/mongo/db/service_context.h7
-rw-r--r--src/mongo/db/service_entry_point_common.cpp3
-rw-r--r--src/mongo/db/service_entry_point_mongod.h4
-rw-r--r--src/mongo/db/session.h4
-rw-r--r--src/mongo/db/session_catalog.h7
-rw-r--r--src/mongo/db/sorter/sorter.h10
-rw-r--r--src/mongo/db/stats/server_read_concern_metrics.h3
-rw-r--r--src/mongo/db/stats/server_write_concern_metrics.h3
-rw-r--r--src/mongo/db/storage/biggie/biggie_kv_engine.cpp1
-rw-r--r--src/mongo/db/storage/devnull/devnull_kv_engine.cpp4
-rw-r--r--src/mongo/db/storage/encryption_hooks.h1
-rw-r--r--src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.h4
-rw-r--r--src/mongo/db/storage/mobile/mobile_session.h4
-rw-r--r--src/mongo/db/storage/mobile/mobile_session_pool.h7
-rw-r--r--src/mongo/db/storage/record_store.h3
-rw-r--r--src/mongo/db/storage/recovery_unit.h7
-rw-r--r--src/mongo/db/storage/remove_saver.h4
-rw-r--r--src/mongo/db/storage/storage_engine_lock_file.h4
-rw-r--r--src/mongo/db/storage/storage_engine_metadata.h4
-rw-r--r--src/mongo/db/storage/storage_repair_observer.h4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.h4
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_util.h7
-rw-r--r--src/mongo/db/storage/write_unit_of_work.h4
-rw-r--r--src/mongo/db/transaction_participant.h4
-rw-r--r--src/mongo/db/views/view_catalog.h3
-rw-r--r--src/mongo/db/views/view_graph.h3
-rw-r--r--src/mongo/db/wire_version.h4
270 files changed, 615 insertions, 483 deletions
diff --git a/src/mongo/db/auth/auth_op_observer.h b/src/mongo/db/auth/auth_op_observer.h
index a31e09cdfe9..3e91a9c9884 100644
--- a/src/mongo/db/auth/auth_op_observer.h
+++ b/src/mongo/db/auth/auth_op_observer.h
@@ -38,7 +38,8 @@ namespace mongo {
* relevant entries for authentication.
*/
class AuthOpObserver final : public OpObserver {
- MONGO_DISALLOW_COPYING(AuthOpObserver);
+ AuthOpObserver(const AuthOpObserver&) = delete;
+ AuthOpObserver& operator=(const AuthOpObserver&) = delete;
public:
AuthOpObserver();
diff --git a/src/mongo/db/auth/authentication_session.h b/src/mongo/db/auth/authentication_session.h
index 5eceeedff09..a7d5e779828 100644
--- a/src/mongo/db/auth/authentication_session.h
+++ b/src/mongo/db/auth/authentication_session.h
@@ -31,7 +31,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/auth/sasl_mechanism_registry.h"
namespace mongo {
@@ -42,7 +41,8 @@ class Client;
* Type representing an ongoing authentication session.
*/
class AuthenticationSession {
- MONGO_DISALLOW_COPYING(AuthenticationSession);
+ AuthenticationSession(const AuthenticationSession&) = delete;
+ AuthenticationSession& operator=(const AuthenticationSession&) = delete;
public:
explicit AuthenticationSession(std::unique_ptr<ServerMechanismBase> mech)
diff --git a/src/mongo/db/auth/authorization_manager.h b/src/mongo/db/auth/authorization_manager.h
index 1ec9f421a4c..b1b6a6e0583 100644
--- a/src/mongo/db/auth/authorization_manager.h
+++ b/src/mongo/db/auth/authorization_manager.h
@@ -34,7 +34,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/secure_allocator.h"
#include "mongo/base/shim.h"
#include "mongo/base/status.h"
diff --git a/src/mongo/db/auth/authorization_manager_impl.cpp b/src/mongo/db/auth/authorization_manager_impl.cpp
index 9eb185421ef..bf5d941adf6 100644
--- a/src/mongo/db/auth/authorization_manager_impl.cpp
+++ b/src/mongo/db/auth/authorization_manager_impl.cpp
@@ -263,7 +263,8 @@ MONGO_REGISTER_SHIM(AuthorizationManager::create)()->std::unique_ptr<Authorizati
* into the cache, because some invalidation event occurred during the fetch phase.
*/
class AuthorizationManagerImpl::CacheGuard {
- MONGO_DISALLOW_COPYING(CacheGuard);
+ CacheGuard(const CacheGuard&) = delete;
+ CacheGuard& operator=(const CacheGuard&) = delete;
public:
/**
diff --git a/src/mongo/db/auth/authorization_manager_impl.h b/src/mongo/db/auth/authorization_manager_impl.h
index 66f088b69b6..8b1d1dd06a1 100644
--- a/src/mongo/db/auth/authorization_manager_impl.h
+++ b/src/mongo/db/auth/authorization_manager_impl.h
@@ -34,7 +34,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/secure_allocator.h"
#include "mongo/base/status.h"
#include "mongo/bson/mutable/element.h"
diff --git a/src/mongo/db/auth/authorization_session_for_test.h b/src/mongo/db/auth/authorization_session_for_test.h
index a52a30b2fd1..b5eee9d1efd 100644
--- a/src/mongo/db/auth/authorization_session_for_test.h
+++ b/src/mongo/db/auth/authorization_session_for_test.h
@@ -39,7 +39,8 @@
namespace mongo {
class AuthorizationSessionForTest : public AuthorizationSessionImpl {
- MONGO_DISALLOW_COPYING(AuthorizationSessionForTest);
+ AuthorizationSessionForTest(const AuthorizationSessionForTest&) = delete;
+ AuthorizationSessionForTest& operator=(const AuthorizationSessionForTest&) = delete;
public:
using AuthorizationSessionImpl::AuthorizationSessionImpl;
diff --git a/src/mongo/db/auth/authorization_session_impl.h b/src/mongo/db/auth/authorization_session_impl.h
index 2cdc380ec77..5820052f811 100644
--- a/src/mongo/db/auth/authorization_session_impl.h
+++ b/src/mongo/db/auth/authorization_session_impl.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/action_type.h"
diff --git a/src/mongo/db/auth/authz_manager_external_state.h b/src/mongo/db/auth/authz_manager_external_state.h
index 8fe4cff6ad8..361ff2a3f1f 100644
--- a/src/mongo/db/auth/authz_manager_external_state.h
+++ b/src/mongo/db/auth/authz_manager_external_state.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/shim.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authorization_manager.h"
diff --git a/src/mongo/db/auth/authz_manager_external_state_d.h b/src/mongo/db/auth/authz_manager_external_state_d.h
index d5eaecc9659..38d1c1df8b7 100644
--- a/src/mongo/db/auth/authz_manager_external_state_d.h
+++ b/src/mongo/db/auth/authz_manager_external_state_d.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_manager_external_state_local.h"
#include "mongo/db/auth/role_graph.h"
@@ -44,7 +43,8 @@ namespace mongo {
* The implementation of AuthzManagerExternalState functionality for mongod.
*/
class AuthzManagerExternalStateMongod : public AuthzManagerExternalStateLocal {
- MONGO_DISALLOW_COPYING(AuthzManagerExternalStateMongod);
+ AuthzManagerExternalStateMongod(const AuthzManagerExternalStateMongod&) = delete;
+ AuthzManagerExternalStateMongod& operator=(const AuthzManagerExternalStateMongod&) = delete;
public:
AuthzManagerExternalStateMongod();
diff --git a/src/mongo/db/auth/authz_manager_external_state_local.h b/src/mongo/db/auth/authz_manager_external_state_local.h
index 1307fb560c4..492f182cbbd 100644
--- a/src/mongo/db/auth/authz_manager_external_state_local.h
+++ b/src/mongo/db/auth/authz_manager_external_state_local.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_manager_external_state.h"
#include "mongo/db/auth/role_graph.h"
@@ -51,7 +50,8 @@ class Document;
* and user information are stored locally.
*/
class AuthzManagerExternalStateLocal : public AuthzManagerExternalState {
- MONGO_DISALLOW_COPYING(AuthzManagerExternalStateLocal);
+ AuthzManagerExternalStateLocal(const AuthzManagerExternalStateLocal&) = delete;
+ AuthzManagerExternalStateLocal& operator=(const AuthzManagerExternalStateLocal&) = delete;
public:
virtual ~AuthzManagerExternalStateLocal() = default;
diff --git a/src/mongo/db/auth/authz_manager_external_state_mock.h b/src/mongo/db/auth/authz_manager_external_state_mock.h
index 5110f39988c..9d316a764f9 100644
--- a/src/mongo/db/auth/authz_manager_external_state_mock.h
+++ b/src/mongo/db/auth/authz_manager_external_state_mock.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_manager_external_state_local.h"
#include "mongo/db/auth/role_graph.h"
@@ -49,7 +48,8 @@ class AuthorizationManager;
* Mock of the AuthzManagerExternalState class used only for testing.
*/
class AuthzManagerExternalStateMock : public AuthzManagerExternalStateLocal {
- MONGO_DISALLOW_COPYING(AuthzManagerExternalStateMock);
+ AuthzManagerExternalStateMock(const AuthzManagerExternalStateMock&) = delete;
+ AuthzManagerExternalStateMock& operator=(const AuthzManagerExternalStateMock&) = delete;
public:
AuthzManagerExternalStateMock();
diff --git a/src/mongo/db/auth/authz_manager_external_state_s.h b/src/mongo/db/auth/authz_manager_external_state_s.h
index 113a3d8276e..f0f1e476c8a 100644
--- a/src/mongo/db/auth/authz_manager_external_state_s.h
+++ b/src/mongo/db/auth/authz_manager_external_state_s.h
@@ -32,7 +32,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_manager_external_state.h"
#include "mongo/db/auth/privilege_format.h"
@@ -45,7 +44,8 @@ namespace mongo {
* The implementation of AuthzManagerExternalState functionality for mongos.
*/
class AuthzManagerExternalStateMongos : public AuthzManagerExternalState {
- MONGO_DISALLOW_COPYING(AuthzManagerExternalStateMongos);
+ AuthzManagerExternalStateMongos(const AuthzManagerExternalStateMongos&) = delete;
+ AuthzManagerExternalStateMongos& operator=(const AuthzManagerExternalStateMongos&) = delete;
public:
AuthzManagerExternalStateMongos();
diff --git a/src/mongo/db/auth/authz_session_external_state.h b/src/mongo/db/auth/authz_session_external_state.h
index f7bffa12e31..7647a9c9df9 100644
--- a/src/mongo/db/auth/authz_session_external_state.h
+++ b/src/mongo/db/auth/authz_session_external_state.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/user_name.h"
diff --git a/src/mongo/db/auth/authz_session_external_state_d.h b/src/mongo/db/auth/authz_session_external_state_d.h
index 342ceed1285..1b29c027b97 100644
--- a/src/mongo/db/auth/authz_session_external_state_d.h
+++ b/src/mongo/db/auth/authz_session_external_state_d.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_session_external_state_server_common.h"
@@ -39,7 +38,8 @@ namespace mongo {
* The implementation of AuthzSessionExternalState functionality for mongod.
*/
class AuthzSessionExternalStateMongod : public AuthzSessionExternalStateServerCommon {
- MONGO_DISALLOW_COPYING(AuthzSessionExternalStateMongod);
+ AuthzSessionExternalStateMongod(const AuthzSessionExternalStateMongod&) = delete;
+ AuthzSessionExternalStateMongod& operator=(const AuthzSessionExternalStateMongod&) = delete;
public:
AuthzSessionExternalStateMongod(AuthorizationManager* authzManager);
diff --git a/src/mongo/db/auth/authz_session_external_state_mock.h b/src/mongo/db/auth/authz_session_external_state_mock.h
index b616ae19e35..ade50f65f98 100644
--- a/src/mongo/db/auth/authz_session_external_state_mock.h
+++ b/src/mongo/db/auth/authz_session_external_state_mock.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_session_external_state.h"
diff --git a/src/mongo/db/auth/authz_session_external_state_s.h b/src/mongo/db/auth/authz_session_external_state_s.h
index a894d6fe6ae..46046e3bef1 100644
--- a/src/mongo/db/auth/authz_session_external_state_s.h
+++ b/src/mongo/db/auth/authz_session_external_state_s.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_session_external_state_server_common.h"
@@ -39,7 +38,8 @@ namespace mongo {
* The implementation of AuthzSessionExternalState functionality for mongos.
*/
class AuthzSessionExternalStateMongos : public AuthzSessionExternalStateServerCommon {
- MONGO_DISALLOW_COPYING(AuthzSessionExternalStateMongos);
+ AuthzSessionExternalStateMongos(const AuthzSessionExternalStateMongos&) = delete;
+ AuthzSessionExternalStateMongos& operator=(const AuthzSessionExternalStateMongos&) = delete;
public:
AuthzSessionExternalStateMongos(AuthorizationManager* authzManager);
diff --git a/src/mongo/db/auth/authz_session_external_state_server_common.h b/src/mongo/db/auth/authz_session_external_state_server_common.h
index 110d74f3f26..51dcd1b2bc2 100644
--- a/src/mongo/db/auth/authz_session_external_state_server_common.h
+++ b/src/mongo/db/auth/authz_session_external_state_server_common.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/authz_session_external_state.h"
@@ -39,7 +38,9 @@ namespace mongo {
* The implementation of AuthzSessionExternalState functionality common to mongod and mongos.
*/
class AuthzSessionExternalStateServerCommon : public AuthzSessionExternalState {
- MONGO_DISALLOW_COPYING(AuthzSessionExternalStateServerCommon);
+ AuthzSessionExternalStateServerCommon(const AuthzSessionExternalStateServerCommon&) = delete;
+ AuthzSessionExternalStateServerCommon& operator=(const AuthzSessionExternalStateServerCommon&) =
+ delete;
public:
virtual ~AuthzSessionExternalStateServerCommon();
diff --git a/src/mongo/db/auth/impersonation_session.h b/src/mongo/db/auth/impersonation_session.h
index 603142f2cbf..bab75018f8b 100644
--- a/src/mongo/db/auth/impersonation_session.h
+++ b/src/mongo/db/auth/impersonation_session.h
@@ -27,7 +27,6 @@
* it in the license file.
*/
-#include "mongo/base/disallow_copying.h"
#include "mongo/rpc/metadata/impersonated_user_metadata.h"
namespace mongo {
@@ -38,7 +37,8 @@ class OperationContext;
* for the duration of the life of this object.
*/
class ImpersonationSessionGuard {
- MONGO_DISALLOW_COPYING(ImpersonationSessionGuard);
+ ImpersonationSessionGuard(const ImpersonationSessionGuard&) = delete;
+ ImpersonationSessionGuard& operator=(const ImpersonationSessionGuard&) = delete;
public:
ImpersonationSessionGuard(OperationContext* opCtx);
diff --git a/src/mongo/db/auth/privilege_parser.h b/src/mongo/db/auth/privilege_parser.h
index 5c7214ba047..853a371193e 100644
--- a/src/mongo/db/auth/privilege_parser.h
+++ b/src/mongo/db/auth/privilege_parser.h
@@ -44,7 +44,8 @@ class Privilege;
* of privileges granted to roles in the role management commands.
*/
class ParsedResource {
- MONGO_DISALLOW_COPYING(ParsedResource);
+ ParsedResource(const ParsedResource&) = delete;
+ ParsedResource& operator=(const ParsedResource&) = delete;
public:
//
@@ -124,7 +125,8 @@ private:
* This class is used to parse documents describing privileges in the role managment commands.
*/
class ParsedPrivilege {
- MONGO_DISALLOW_COPYING(ParsedPrivilege);
+ ParsedPrivilege(const ParsedPrivilege&) = delete;
+ ParsedPrivilege& operator=(const ParsedPrivilege&) = delete;
public:
//
diff --git a/src/mongo/db/auth/role_name.h b/src/mongo/db/auth/role_name.h
index 1f319b4c49f..75aa6202920 100644
--- a/src/mongo/db/auth/role_name.h
+++ b/src/mongo/db/auth/role_name.h
@@ -35,7 +35,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonelement.h"
#include "mongo/bson/bsonobjbuilder.h"
@@ -128,7 +127,8 @@ std::ostream& operator<<(std::ostream& os, const RoleName& name);
class RoleNameIterator {
public:
class Impl {
- MONGO_DISALLOW_COPYING(Impl);
+ Impl(const Impl&) = delete;
+ Impl& operator=(const Impl&) = delete;
public:
Impl(){};
@@ -182,7 +182,8 @@ namespace mongo {
template <typename ContainerIterator>
class RoleNameContainerIteratorImpl : public RoleNameIterator::Impl {
- MONGO_DISALLOW_COPYING(RoleNameContainerIteratorImpl);
+ RoleNameContainerIteratorImpl(const RoleNameContainerIteratorImpl&) = delete;
+ RoleNameContainerIteratorImpl& operator=(const RoleNameContainerIteratorImpl&) = delete;
public:
RoleNameContainerIteratorImpl(const ContainerIterator& begin, const ContainerIterator& end)
diff --git a/src/mongo/db/auth/sasl_scram_server_conversation.cpp b/src/mongo/db/auth/sasl_scram_server_conversation.cpp
index e9f2fbddbce..9415376afe5 100644
--- a/src/mongo/db/auth/sasl_scram_server_conversation.cpp
+++ b/src/mongo/db/auth/sasl_scram_server_conversation.cpp
@@ -36,7 +36,6 @@
#include <boost/algorithm/string/join.hpp>
#include <boost/algorithm/string/replace.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/init.h"
#include "mongo/base/status.h"
#include "mongo/base/string_data.h"
diff --git a/src/mongo/db/auth/user.h b/src/mongo/db/auth/user.h
index 5b3edfb767f..9ed29c72409 100644
--- a/src/mongo/db/auth/user.h
+++ b/src/mongo/db/auth/user.h
@@ -32,7 +32,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/crypto/sha1_block.h"
#include "mongo/crypto/sha256_block.h"
#include "mongo/db/auth/privilege.h"
@@ -61,7 +60,8 @@ namespace mongo {
* user from the AuthorizationManager.
*/
class User {
- MONGO_DISALLOW_COPYING(User);
+ User(const User&) = delete;
+ User& operator=(const User&) = delete;
public:
template <typename HashBlock>
diff --git a/src/mongo/db/auth/user_document_parser.h b/src/mongo/db/auth/user_document_parser.h
index 7493ce7d324..4fca54c3739 100644
--- a/src/mongo/db/auth/user_document_parser.h
+++ b/src/mongo/db/auth/user_document_parser.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/user.h"
@@ -38,7 +37,8 @@
namespace mongo {
class V2UserDocumentParser {
- MONGO_DISALLOW_COPYING(V2UserDocumentParser);
+ V2UserDocumentParser(const V2UserDocumentParser&) = delete;
+ V2UserDocumentParser& operator=(const V2UserDocumentParser&) = delete;
public:
V2UserDocumentParser() {}
diff --git a/src/mongo/db/auth/user_management_commands_parser.h b/src/mongo/db/auth/user_management_commands_parser.h
index ba337f132c2..d249871a63b 100644
--- a/src/mongo/db/auth/user_management_commands_parser.h
+++ b/src/mongo/db/auth/user_management_commands_parser.h
@@ -32,7 +32,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/string_data.h"
#include "mongo/db/auth/authorization_manager.h"
diff --git a/src/mongo/db/auth/user_name.h b/src/mongo/db/auth/user_name.h
index fe9d560a397..fde52bc3297 100644
--- a/src/mongo/db/auth/user_name.h
+++ b/src/mongo/db/auth/user_name.h
@@ -35,7 +35,6 @@
#include "mongo/base/clonable_ptr.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonelement.h"
diff --git a/src/mongo/db/auth/user_set.cpp b/src/mongo/db/auth/user_set.cpp
index 6ca9c2e6b90..52fa1bf164a 100644
--- a/src/mongo/db/auth/user_set.cpp
+++ b/src/mongo/db/auth/user_set.cpp
@@ -41,7 +41,8 @@ namespace mongo {
namespace {
class UserSetNameIteratorImpl : public UserNameIterator::Impl {
- MONGO_DISALLOW_COPYING(UserSetNameIteratorImpl);
+ UserSetNameIteratorImpl(const UserSetNameIteratorImpl&) = delete;
+ UserSetNameIteratorImpl& operator=(const UserSetNameIteratorImpl&) = delete;
public:
UserSetNameIteratorImpl(const UserSet::const_iterator& begin,
diff --git a/src/mongo/db/auth/user_set.h b/src/mongo/db/auth/user_set.h
index 91941621984..b4e88f7bbd7 100644
--- a/src/mongo/db/auth/user_set.h
+++ b/src/mongo/db/auth/user_set.h
@@ -32,7 +32,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/user.h"
@@ -47,7 +46,8 @@ namespace mongo {
* synchronizing access.
*/
class UserSet {
- MONGO_DISALLOW_COPYING(UserSet);
+ UserSet(const UserSet&) = delete;
+ UserSet& operator=(const UserSet&) = delete;
public:
using iterator = stdx::list<UserHandle>::iterator;
diff --git a/src/mongo/db/background.cpp b/src/mongo/db/background.cpp
index f499e8a1a2e..156955134ce 100644
--- a/src/mongo/db/background.cpp
+++ b/src/mongo/db/background.cpp
@@ -34,7 +34,6 @@
#include <iostream>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
#include "mongo/stdx/thread.h"
@@ -50,7 +49,8 @@ using std::shared_ptr;
namespace {
class BgInfo {
- MONGO_DISALLOW_COPYING(BgInfo);
+ BgInfo(const BgInfo&) = delete;
+ BgInfo& operator=(const BgInfo&) = delete;
public:
BgInfo() : _opsInProgCount(0) {}
diff --git a/src/mongo/db/background.h b/src/mongo/db/background.h
index 6aa4a680e03..49bde198a44 100644
--- a/src/mongo/db/background.h
+++ b/src/mongo/db/background.h
@@ -39,7 +39,6 @@
#include <set>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/db/namespace_string.h"
@@ -55,7 +54,8 @@ namespace mongo {
anything special in the implementation here to be fast.
*/
class BackgroundOperation {
- MONGO_DISALLOW_COPYING(BackgroundOperation);
+ BackgroundOperation(const BackgroundOperation&) = delete;
+ BackgroundOperation& operator=(const BackgroundOperation&) = delete;
public:
static bool inProgForDb(StringData db);
diff --git a/src/mongo/db/catalog/document_validation.h b/src/mongo/db/catalog/document_validation.h
index e3b20f2138e..27a7969c6d6 100644
--- a/src/mongo/db/catalog/document_validation.h
+++ b/src/mongo/db/catalog/document_validation.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/db/operation_context.h"
@@ -54,7 +53,8 @@ inline bool shouldBypassDocumentValidationForCommand(const BSONObj& cmdObj) {
* Resets to original value when leaving scope so they are safe to nest.
*/
class DisableDocumentValidation {
- MONGO_DISALLOW_COPYING(DisableDocumentValidation);
+ DisableDocumentValidation(const DisableDocumentValidation&) = delete;
+ DisableDocumentValidation& operator=(const DisableDocumentValidation&) = delete;
public:
DisableDocumentValidation(OperationContext* opCtx)
diff --git a/src/mongo/db/catalog/health_log.h b/src/mongo/db/catalog/health_log.h
index 31c38522b2a..2b312f741fa 100644
--- a/src/mongo/db/catalog/health_log.h
+++ b/src/mongo/db/catalog/health_log.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/concurrency/deferred_writer.h"
#include "mongo/db/service_context.h"
@@ -45,7 +44,8 @@ class HealthLogEntry;
* up on shutdown.
*/
class HealthLog {
- MONGO_DISALLOW_COPYING(HealthLog);
+ HealthLog(const HealthLog&) = delete;
+ HealthLog& operator=(const HealthLog&) = delete;
public:
/**
diff --git a/src/mongo/db/catalog/index_builds_manager.h b/src/mongo/db/catalog/index_builds_manager.h
index 105241fae6d..d72915f5d19 100644
--- a/src/mongo/db/catalog/index_builds_manager.h
+++ b/src/mongo/db/catalog/index_builds_manager.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/catalog/multi_index_block.h"
#include "mongo/db/namespace_string.h"
#include "mongo/stdx/functional.h"
@@ -53,7 +52,8 @@ enum IndexBuildRecoveryState { Building, Verifying, Committing };
* state is set up and then cleaned up by this class.
*/
class IndexBuildsManager {
- MONGO_DISALLOW_COPYING(IndexBuildsManager);
+ IndexBuildsManager(const IndexBuildsManager&) = delete;
+ IndexBuildsManager& operator=(const IndexBuildsManager&) = delete;
public:
/**
diff --git a/src/mongo/db/catalog/index_catalog_entry_impl.h b/src/mongo/db/catalog/index_catalog_entry_impl.h
index de579d8bd16..eab59dfb287 100644
--- a/src/mongo/db/catalog/index_catalog_entry_impl.h
+++ b/src/mongo/db/catalog/index_catalog_entry_impl.h
@@ -55,7 +55,8 @@ class MatchExpression;
class OperationContext;
class IndexCatalogEntryImpl : public IndexCatalogEntry {
- MONGO_DISALLOW_COPYING(IndexCatalogEntryImpl);
+ IndexCatalogEntryImpl(const IndexCatalogEntryImpl&) = delete;
+ IndexCatalogEntryImpl& operator=(const IndexCatalogEntryImpl&) = delete;
public:
explicit IndexCatalogEntryImpl(
diff --git a/src/mongo/db/catalog/index_catalog_impl.h b/src/mongo/db/catalog/index_catalog_impl.h
index d95f557102f..05d790b46b3 100644
--- a/src/mongo/db/catalog/index_catalog_impl.h
+++ b/src/mongo/db/catalog/index_catalog_impl.h
@@ -251,7 +251,8 @@ public:
// --- these probably become private?
class IndexBuildBlock : public IndexCatalog::IndexBuildBlockInterface {
- MONGO_DISALLOW_COPYING(IndexBuildBlock);
+ IndexBuildBlock(const IndexBuildBlock&) = delete;
+ IndexBuildBlock& operator=(const IndexBuildBlock&) = delete;
public:
IndexBuildBlock(IndexCatalogImpl* catalog,
diff --git a/src/mongo/db/catalog/multi_index_block.h b/src/mongo/db/catalog/multi_index_block.h
index 2e32dff5026..99a97df59b9 100644
--- a/src/mongo/db/catalog/multi_index_block.h
+++ b/src/mongo/db/catalog/multi_index_block.h
@@ -35,7 +35,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/base/string_data.h"
@@ -70,7 +69,8 @@ class OperationContext;
* (as it is itself essentially a form of rollback, you don't want to "rollback the rollback").
*/
class MultiIndexBlock {
- MONGO_DISALLOW_COPYING(MultiIndexBlock);
+ MultiIndexBlock(const MultiIndexBlock&) = delete;
+ MultiIndexBlock& operator=(const MultiIndexBlock&) = delete;
public:
MultiIndexBlock() = default;
diff --git a/src/mongo/db/catalog/namespace_uuid_cache.h b/src/mongo/db/catalog/namespace_uuid_cache.h
index d51aa2e89fa..c15466a48a8 100644
--- a/src/mongo/db/catalog/namespace_uuid_cache.h
+++ b/src/mongo/db/catalog/namespace_uuid_cache.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/catalog/collection_options.h"
#include "mongo/db/operation_context.h"
#include "mongo/util/string_map.h"
@@ -47,7 +46,8 @@ using CollectionUUID = UUID;
class Database;
class NamespaceUUIDCache {
- MONGO_DISALLOW_COPYING(NamespaceUUIDCache);
+ NamespaceUUIDCache(const NamespaceUUIDCache&) = delete;
+ NamespaceUUIDCache& operator=(const NamespaceUUIDCache&) = delete;
public:
static const OperationContext::Decoration<NamespaceUUIDCache> get;
diff --git a/src/mongo/db/catalog/uuid_catalog.h b/src/mongo/db/catalog/uuid_catalog.h
index 55d37305e0a..e183b3a850a 100644
--- a/src/mongo/db/catalog/uuid_catalog.h
+++ b/src/mongo/db/catalog/uuid_catalog.h
@@ -31,7 +31,6 @@
#include <unordered_map>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/service_context.h"
@@ -176,7 +175,8 @@ using CollectionUUID = UUID;
class Database;
class UUIDCatalog {
- MONGO_DISALLOW_COPYING(UUIDCatalog);
+ UUIDCatalog(const UUIDCatalog&) = delete;
+ UUIDCatalog& operator=(const UUIDCatalog&) = delete;
public:
class iterator {
diff --git a/src/mongo/db/catalog_raii.h b/src/mongo/db/catalog_raii.h
index 730ba4614e8..aa18dd23e23 100644
--- a/src/mongo/db/catalog_raii.h
+++ b/src/mongo/db/catalog_raii.h
@@ -51,7 +51,8 @@ namespace mongo {
* the database reference returned by this class should not be retained.
*/
class AutoGetDb {
- MONGO_DISALLOW_COPYING(AutoGetDb);
+ AutoGetDb(const AutoGetDb&) = delete;
+ AutoGetDb& operator=(const AutoGetDb&) = delete;
public:
AutoGetDb(OperationContext* opCtx,
@@ -81,7 +82,8 @@ private:
* and the collection references returned by this class should not be retained.
*/
class AutoGetCollection {
- MONGO_DISALLOW_COPYING(AutoGetCollection);
+ AutoGetCollection(const AutoGetCollection&) = delete;
+ AutoGetCollection& operator=(const AutoGetCollection&) = delete;
public:
enum ViewMode { kViewsPermitted, kViewsForbidden };
@@ -165,7 +167,8 @@ private:
* the database reference returned by this class should not be retained.
*/
class AutoGetOrCreateDb {
- MONGO_DISALLOW_COPYING(AutoGetOrCreateDb);
+ AutoGetOrCreateDb(const AutoGetOrCreateDb&) = delete;
+ AutoGetOrCreateDb& operator=(const AutoGetOrCreateDb&) = delete;
public:
AutoGetOrCreateDb(OperationContext* opCtx,
@@ -195,7 +198,8 @@ private:
* The caller must hold the global exclusive lock for the life of the instance.
*/
class ConcealUUIDCatalogChangesBlock {
- MONGO_DISALLOW_COPYING(ConcealUUIDCatalogChangesBlock);
+ ConcealUUIDCatalogChangesBlock(const ConcealUUIDCatalogChangesBlock&) = delete;
+ ConcealUUIDCatalogChangesBlock& operator=(const ConcealUUIDCatalogChangesBlock&) = delete;
public:
/**
diff --git a/src/mongo/db/client.h b/src/mongo/db/client.h
index 7e24368412d..c1b540ac11b 100644
--- a/src/mongo/db/client.h
+++ b/src/mongo/db/client.h
@@ -39,7 +39,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/client.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/service_context.h"
diff --git a/src/mongo/db/clientcursor.h b/src/mongo/db/clientcursor.h
index 56394e8fc0b..92f51255ed5 100644
--- a/src/mongo/db/clientcursor.h
+++ b/src/mongo/db/clientcursor.h
@@ -137,7 +137,8 @@ struct ClientCursorParams {
* of inactivity.
*/
class ClientCursor {
- MONGO_DISALLOW_COPYING(ClientCursor);
+ ClientCursor(const ClientCursor&) = delete;
+ ClientCursor& operator=(const ClientCursor&) = delete;
public:
CursorId cursorid() const {
@@ -456,7 +457,8 @@ private:
* policy.
*/
class ClientCursorPin {
- MONGO_DISALLOW_COPYING(ClientCursorPin);
+ ClientCursorPin(const ClientCursorPin&) = delete;
+ ClientCursorPin& operator=(const ClientCursorPin&) = delete;
public:
/**
diff --git a/src/mongo/db/cloner.h b/src/mongo/db/cloner.h
index b674017cb82..25e0af45736 100644
--- a/src/mongo/db/cloner.h
+++ b/src/mongo/db/cloner.h
@@ -36,7 +36,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/client/dbclient_base.h"
#include "mongo/db/catalog/collection_options.h"
@@ -49,7 +48,8 @@ class OperationContext;
class Cloner {
- MONGO_DISALLOW_COPYING(Cloner);
+ Cloner(const Cloner&) = delete;
+ Cloner& operator=(const Cloner&) = delete;
public:
Cloner();
diff --git a/src/mongo/db/collection_index_builds_tracker.h b/src/mongo/db/collection_index_builds_tracker.h
index 10b4f833f7c..5a4ab1eb5f9 100644
--- a/src/mongo/db/collection_index_builds_tracker.h
+++ b/src/mongo/db/collection_index_builds_tracker.h
@@ -32,7 +32,6 @@
#include <map>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl_index_build_state.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/util/concurrency/with_lock.h"
@@ -53,7 +52,8 @@ class IndexBuildsManager;
* This is intended to only be used by the IndexBuildsCoordinator class.
*/
class CollectionIndexBuildsTracker {
- MONGO_DISALLOW_COPYING(CollectionIndexBuildsTracker);
+ CollectionIndexBuildsTracker(const CollectionIndexBuildsTracker&) = delete;
+ CollectionIndexBuildsTracker& operator=(const CollectionIndexBuildsTracker&) = delete;
public:
CollectionIndexBuildsTracker() = default;
diff --git a/src/mongo/db/collection_index_usage_tracker.h b/src/mongo/db/collection_index_usage_tracker.h
index ed3ee339ccb..62c3b610f41 100644
--- a/src/mongo/db/collection_index_usage_tracker.h
+++ b/src/mongo/db/collection_index_usage_tracker.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/platform/atomic_word.h"
@@ -48,7 +47,8 @@ class ClockSource;
* Indexes must be registered and deregistered on creation/destruction.
*/
class CollectionIndexUsageTracker {
- MONGO_DISALLOW_COPYING(CollectionIndexUsageTracker);
+ CollectionIndexUsageTracker(const CollectionIndexUsageTracker&) = delete;
+ CollectionIndexUsageTracker& operator=(const CollectionIndexUsageTracker&) = delete;
public:
struct IndexUsageStats {
diff --git a/src/mongo/db/commands/current_op.cpp b/src/mongo/db/commands/current_op.cpp
index 6a9d12f3c1c..247a2a6761c 100644
--- a/src/mongo/db/commands/current_op.cpp
+++ b/src/mongo/db/commands/current_op.cpp
@@ -42,7 +42,8 @@
namespace mongo {
class CurrentOpCommand final : public CurrentOpCommandBase {
- MONGO_DISALLOW_COPYING(CurrentOpCommand);
+ CurrentOpCommand(const CurrentOpCommand&) = delete;
+ CurrentOpCommand& operator=(const CurrentOpCommand&) = delete;
public:
CurrentOpCommand() = default;
diff --git a/src/mongo/db/commands/end_sessions_command.cpp b/src/mongo/db/commands/end_sessions_command.cpp
index a1f807a4aaf..9822eebd60c 100644
--- a/src/mongo/db/commands/end_sessions_command.cpp
+++ b/src/mongo/db/commands/end_sessions_command.cpp
@@ -40,7 +40,8 @@
namespace mongo {
class EndSessionsCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(EndSessionsCommand);
+ EndSessionsCommand(const EndSessionsCommand&) = delete;
+ EndSessionsCommand& operator=(const EndSessionsCommand&) = delete;
public:
EndSessionsCommand() : BasicCommand("endSessions") {}
diff --git a/src/mongo/db/commands/getmore_cmd.cpp b/src/mongo/db/commands/getmore_cmd.cpp
index e0b710c5fcd..02cef74021d 100644
--- a/src/mongo/db/commands/getmore_cmd.cpp
+++ b/src/mongo/db/commands/getmore_cmd.cpp
@@ -34,7 +34,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/client.h"
diff --git a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp
index e7c7170f99f..7c3a18d550b 100644
--- a/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp
+++ b/src/mongo/db/commands/kill_all_sessions_by_pattern_command.cpp
@@ -53,7 +53,8 @@
namespace mongo {
class KillAllSessionsByPatternCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(KillAllSessionsByPatternCommand);
+ KillAllSessionsByPatternCommand(const KillAllSessionsByPatternCommand&) = delete;
+ KillAllSessionsByPatternCommand& operator=(const KillAllSessionsByPatternCommand&) = delete;
public:
KillAllSessionsByPatternCommand() : BasicCommand("killAllSessionsByPattern") {}
diff --git a/src/mongo/db/commands/kill_all_sessions_command.cpp b/src/mongo/db/commands/kill_all_sessions_command.cpp
index 14471771481..b11513efd55 100644
--- a/src/mongo/db/commands/kill_all_sessions_command.cpp
+++ b/src/mongo/db/commands/kill_all_sessions_command.cpp
@@ -53,7 +53,8 @@
namespace mongo {
class KillAllSessionsCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(KillAllSessionsCommand);
+ KillAllSessionsCommand(const KillAllSessionsCommand&) = delete;
+ KillAllSessionsCommand& operator=(const KillAllSessionsCommand&) = delete;
public:
KillAllSessionsCommand() : BasicCommand("killAllSessions") {}
diff --git a/src/mongo/db/commands/kill_sessions_command.cpp b/src/mongo/db/commands/kill_sessions_command.cpp
index f4d46c200f1..afa5d2357e1 100644
--- a/src/mongo/db/commands/kill_sessions_command.cpp
+++ b/src/mongo/db/commands/kill_sessions_command.cpp
@@ -80,7 +80,8 @@ KillAllSessionsByPatternSet patternsForLoggedInUser(OperationContext* opCtx) {
} // namespace
class KillSessionsCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(KillSessionsCommand);
+ KillSessionsCommand(const KillSessionsCommand&) = delete;
+ KillSessionsCommand& operator=(const KillSessionsCommand&) = delete;
public:
KillSessionsCommand() : BasicCommand("killSessions") {}
diff --git a/src/mongo/db/commands/killcursors_cmd.cpp b/src/mongo/db/commands/killcursors_cmd.cpp
index bda674408c3..a81c59b8702 100644
--- a/src/mongo/db/commands/killcursors_cmd.cpp
+++ b/src/mongo/db/commands/killcursors_cmd.cpp
@@ -29,7 +29,6 @@
#include "mongo/platform/basic.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/commands/killcursors_common.h"
@@ -43,7 +42,8 @@
namespace mongo {
class KillCursorsCmd final : public KillCursorsCmdBase {
- MONGO_DISALLOW_COPYING(KillCursorsCmd);
+ KillCursorsCmd(const KillCursorsCmd&) = delete;
+ KillCursorsCmd& operator=(const KillCursorsCmd&) = delete;
public:
KillCursorsCmd() = default;
diff --git a/src/mongo/db/commands/list_collections_filter.h b/src/mongo/db/commands/list_collections_filter.h
index d54775551a2..d355e9647b1 100644
--- a/src/mongo/db/commands/list_collections_filter.h
+++ b/src/mongo/db/commands/list_collections_filter.h
@@ -29,13 +29,13 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
namespace mongo {
class ListCollectionsFilter {
- MONGO_DISALLOW_COPYING(ListCollectionsFilter);
+ ListCollectionsFilter(const ListCollectionsFilter&) = delete;
+ ListCollectionsFilter& operator=(const ListCollectionsFilter&) = delete;
public:
/**
diff --git a/src/mongo/db/commands/mr.h b/src/mongo/db/commands/mr.h
index cdb96e18f6d..d9ced2102af 100644
--- a/src/mongo/db/commands/mr.h
+++ b/src/mongo/db/commands/mr.h
@@ -53,7 +53,8 @@ class State;
// ------------ function interfaces -----------
class Mapper {
- MONGO_DISALLOW_COPYING(Mapper);
+ Mapper(const Mapper&) = delete;
+ Mapper& operator=(const Mapper&) = delete;
public:
virtual ~Mapper() {}
@@ -66,7 +67,8 @@ protected:
};
class Finalizer {
- MONGO_DISALLOW_COPYING(Finalizer);
+ Finalizer(const Finalizer&) = delete;
+ Finalizer& operator=(const Finalizer&) = delete;
public:
virtual ~Finalizer() {}
@@ -82,7 +84,8 @@ protected:
};
class Reducer {
- MONGO_DISALLOW_COPYING(Reducer);
+ Reducer(const Reducer&) = delete;
+ Reducer& operator=(const Reducer&) = delete;
public:
Reducer() : numReduces(0) {}
@@ -103,7 +106,8 @@ public:
* visitor like pattern as Scope is gotten from first access
*/
class JSFunction {
- MONGO_DISALLOW_COPYING(JSFunction);
+ JSFunction(const JSFunction&) = delete;
+ JSFunction& operator=(const JSFunction&) = delete;
public:
/**
diff --git a/src/mongo/db/commands/reap_logical_session_cache_now.cpp b/src/mongo/db/commands/reap_logical_session_cache_now.cpp
index ec68eef7b60..8379169e84e 100644
--- a/src/mongo/db/commands/reap_logical_session_cache_now.cpp
+++ b/src/mongo/db/commands/reap_logical_session_cache_now.cpp
@@ -41,7 +41,8 @@ namespace mongo {
namespace {
class ReapLogicalSessionCacheNowCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(ReapLogicalSessionCacheNowCommand);
+ ReapLogicalSessionCacheNowCommand(const ReapLogicalSessionCacheNowCommand&) = delete;
+ ReapLogicalSessionCacheNowCommand& operator=(const ReapLogicalSessionCacheNowCommand&) = delete;
public:
ReapLogicalSessionCacheNowCommand() : BasicCommand("reapLogicalSessionCacheNow") {}
diff --git a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp
index 814e8fd6b16..8d09a15f17a 100644
--- a/src/mongo/db/commands/refresh_logical_session_cache_now.cpp
+++ b/src/mongo/db/commands/refresh_logical_session_cache_now.cpp
@@ -42,7 +42,9 @@ namespace mongo {
namespace {
class RefreshLogicalSessionCacheNowCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(RefreshLogicalSessionCacheNowCommand);
+ RefreshLogicalSessionCacheNowCommand(const RefreshLogicalSessionCacheNowCommand&) = delete;
+ RefreshLogicalSessionCacheNowCommand& operator=(const RefreshLogicalSessionCacheNowCommand&) =
+ delete;
public:
RefreshLogicalSessionCacheNowCommand() : BasicCommand("refreshLogicalSessionCacheNow") {}
diff --git a/src/mongo/db/commands/refresh_sessions_command.cpp b/src/mongo/db/commands/refresh_sessions_command.cpp
index 6d83fe44e34..229db890078 100644
--- a/src/mongo/db/commands/refresh_sessions_command.cpp
+++ b/src/mongo/db/commands/refresh_sessions_command.cpp
@@ -42,7 +42,8 @@
namespace mongo {
class RefreshSessionsCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(RefreshSessionsCommand);
+ RefreshSessionsCommand(const RefreshSessionsCommand&) = delete;
+ RefreshSessionsCommand& operator=(const RefreshSessionsCommand&) = delete;
public:
RefreshSessionsCommand() : BasicCommand("refreshSessions") {}
diff --git a/src/mongo/db/commands/refresh_sessions_command_internal.cpp b/src/mongo/db/commands/refresh_sessions_command_internal.cpp
index be1f8b3f8b6..aa3ebb4b194 100644
--- a/src/mongo/db/commands/refresh_sessions_command_internal.cpp
+++ b/src/mongo/db/commands/refresh_sessions_command_internal.cpp
@@ -42,7 +42,8 @@
namespace mongo {
class RefreshSessionsCommandInternal final : public BasicCommand {
- MONGO_DISALLOW_COPYING(RefreshSessionsCommandInternal);
+ RefreshSessionsCommandInternal(const RefreshSessionsCommandInternal&) = delete;
+ RefreshSessionsCommandInternal& operator=(const RefreshSessionsCommandInternal&) = delete;
public:
RefreshSessionsCommandInternal() : BasicCommand("refreshSessionsInternal") {}
diff --git a/src/mongo/db/commands/start_session_command.cpp b/src/mongo/db/commands/start_session_command.cpp
index cf4aafb551f..a9e64c9d5c4 100644
--- a/src/mongo/db/commands/start_session_command.cpp
+++ b/src/mongo/db/commands/start_session_command.cpp
@@ -47,7 +47,8 @@
namespace mongo {
class StartSessionCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(StartSessionCommand);
+ StartSessionCommand(const StartSessionCommand&) = delete;
+ StartSessionCommand& operator=(const StartSessionCommand&) = delete;
public:
StartSessionCommand() : BasicCommand("startSession") {}
diff --git a/src/mongo/db/concurrency/d_concurrency.h b/src/mongo/db/concurrency/d_concurrency.h
index 7f6f52e9c99..e6259e85ca4 100644
--- a/src/mongo/db/concurrency/d_concurrency.h
+++ b/src/mongo/db/concurrency/d_concurrency.h
@@ -46,7 +46,8 @@ public:
* NOTE: DO NOT add any new usages of TempRelease. It is being deprecated/removed.
*/
class TempRelease {
- MONGO_DISALLOW_COPYING(TempRelease);
+ TempRelease(const TempRelease&) = delete;
+ TempRelease& operator=(const TempRelease&) = delete;
public:
explicit TempRelease(Locker* lockState);
@@ -72,7 +73,8 @@ public:
* resources other than RESOURCE_GLOBAL, RESOURCE_DATABASE and RESOURCE_COLLECTION.
*/
class ResourceLock {
- MONGO_DISALLOW_COPYING(ResourceLock);
+ ResourceLock(const ResourceLock&) = delete;
+ ResourceLock& operator=(const ResourceLock&) = delete;
public:
ResourceLock(Locker* locker, ResourceId rid)
@@ -352,7 +354,8 @@ public:
* will be upgraded to MODE_S and MODE_IX will be upgraded to MODE_X.
*/
class CollectionLock {
- MONGO_DISALLOW_COPYING(CollectionLock);
+ CollectionLock(const CollectionLock&) = delete;
+ CollectionLock& operator=(const CollectionLock&) = delete;
public:
CollectionLock(Locker* lockState,
@@ -379,7 +382,8 @@ public:
* dassert(), to not have a suitable database lock when taking this lock.
*/
class OplogIntentWriteLock {
- MONGO_DISALLOW_COPYING(OplogIntentWriteLock);
+ OplogIntentWriteLock(const OplogIntentWriteLock&) = delete;
+ OplogIntentWriteLock& operator=(const OplogIntentWriteLock&) = delete;
public:
explicit OplogIntentWriteLock(Locker* lockState);
@@ -398,7 +402,8 @@ public:
* writers just call setShouldConflictWithSecondaryBatchApplication(false).
*/
class ParallelBatchWriterMode {
- MONGO_DISALLOW_COPYING(ParallelBatchWriterMode);
+ ParallelBatchWriterMode(const ParallelBatchWriterMode&) = delete;
+ ParallelBatchWriterMode& operator=(const ParallelBatchWriterMode&) = delete;
public:
explicit ParallelBatchWriterMode(Locker* lockState);
diff --git a/src/mongo/db/concurrency/deferred_writer.h b/src/mongo/db/concurrency/deferred_writer.h
index f855752a570..d573f497851 100644
--- a/src/mongo/db/concurrency/deferred_writer.h
+++ b/src/mongo/db/concurrency/deferred_writer.h
@@ -57,7 +57,8 @@ class ThreadPool;
* improper use of the ctor, `flush` and `shutdown` methods below.
*/
class DeferredWriter {
- MONGO_DISALLOW_COPYING(DeferredWriter);
+ DeferredWriter(const DeferredWriter&) = delete;
+ DeferredWriter& operator=(const DeferredWriter&) = delete;
public:
/**
diff --git a/src/mongo/db/concurrency/lock_manager.h b/src/mongo/db/concurrency/lock_manager.h
index 737435334bb..ab113b48aad 100644
--- a/src/mongo/db/concurrency/lock_manager.h
+++ b/src/mongo/db/concurrency/lock_manager.h
@@ -52,7 +52,8 @@ namespace mongo {
* instead go through the Locker interface.
*/
class LockManager {
- MONGO_DISALLOW_COPYING(LockManager);
+ LockManager(const LockManager&) = delete;
+ LockManager& operator=(const LockManager&) = delete;
public:
LockManager();
diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp
index ab49d9f878e..225e563fe6e 100644
--- a/src/mongo/db/concurrency/lock_state.cpp
+++ b/src/mongo/db/concurrency/lock_state.cpp
@@ -59,7 +59,8 @@ namespace {
* Partitioned global lock statistics, so we don't hit the same bucket.
*/
class PartitionedInstanceWideLockStats {
- MONGO_DISALLOW_COPYING(PartitionedInstanceWideLockStats);
+ PartitionedInstanceWideLockStats(const PartitionedInstanceWideLockStats&) = delete;
+ PartitionedInstanceWideLockStats& operator=(const PartitionedInstanceWideLockStats&) = delete;
public:
PartitionedInstanceWideLockStats() {}
diff --git a/src/mongo/db/concurrency/lock_state.h b/src/mongo/db/concurrency/lock_state.h
index b9ecdc3cbfd..f7659dc9b4b 100644
--- a/src/mongo/db/concurrency/lock_state.h
+++ b/src/mongo/db/concurrency/lock_state.h
@@ -44,7 +44,8 @@ namespace mongo {
* variable, which can be waited on.
*/
class CondVarLockGrantNotification : public LockGrantNotification {
- MONGO_DISALLOW_COPYING(CondVarLockGrantNotification);
+ CondVarLockGrantNotification(const CondVarLockGrantNotification&) = delete;
+ CondVarLockGrantNotification& operator=(const CondVarLockGrantNotification&) = delete;
public:
CondVarLockGrantNotification();
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h
index 158d073ae35..24f9dfbd532 100644
--- a/src/mongo/db/concurrency/locker.h
+++ b/src/mongo/db/concurrency/locker.h
@@ -46,7 +46,8 @@ namespace mongo {
* Lock/unlock methods must always be called from a single thread.
*/
class Locker {
- MONGO_DISALLOW_COPYING(Locker);
+ Locker(const Locker&) = delete;
+ Locker& operator=(const Locker&) = delete;
friend class UninterruptibleLockGuard;
@@ -537,7 +538,10 @@ private:
* RAII-style class to opt out of replication's use of ParallelBatchWriterMode.
*/
class ShouldNotConflictWithSecondaryBatchApplicationBlock {
- MONGO_DISALLOW_COPYING(ShouldNotConflictWithSecondaryBatchApplicationBlock);
+ ShouldNotConflictWithSecondaryBatchApplicationBlock(
+ const ShouldNotConflictWithSecondaryBatchApplicationBlock&) = delete;
+ ShouldNotConflictWithSecondaryBatchApplicationBlock& operator=(
+ const ShouldNotConflictWithSecondaryBatchApplicationBlock&) = delete;
public:
explicit ShouldNotConflictWithSecondaryBatchApplicationBlock(Locker* lockState)
diff --git a/src/mongo/db/concurrency/replication_state_transition_lock_guard.h b/src/mongo/db/concurrency/replication_state_transition_lock_guard.h
index cbb23bb8a8d..3dc48de025b 100644
--- a/src/mongo/db/concurrency/replication_state_transition_lock_guard.h
+++ b/src/mongo/db/concurrency/replication_state_transition_lock_guard.h
@@ -31,7 +31,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/concurrency/lock_manager_defs.h"
#include "mongo/util/time_support.h"
@@ -46,7 +45,9 @@ namespace repl {
* that need to happen in between enqueuing the RSTL request and waiting for it to be granted.
*/
class ReplicationStateTransitionLockGuard {
- MONGO_DISALLOW_COPYING(ReplicationStateTransitionLockGuard);
+ ReplicationStateTransitionLockGuard(const ReplicationStateTransitionLockGuard&) = delete;
+ ReplicationStateTransitionLockGuard& operator=(const ReplicationStateTransitionLockGuard&) =
+ delete;
public:
class EnqueueOnly {};
diff --git a/src/mongo/db/curop.cpp b/src/mongo/db/curop.cpp
index 5208639bc93..cb18faa1337 100644
--- a/src/mongo/db/curop.cpp
+++ b/src/mongo/db/curop.cpp
@@ -37,7 +37,6 @@
#include <iomanip>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/mutable/document.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/client.h"
@@ -147,7 +146,8 @@ BSONObj upconvertGetMoreEntry(const NamespaceString& nss, CursorId cursorId, int
* The stack itself is represented in the _parent pointers of the CurOp class.
*/
class CurOp::CurOpStack {
- MONGO_DISALLOW_COPYING(CurOpStack);
+ CurOpStack(const CurOpStack&) = delete;
+ CurOpStack& operator=(const CurOpStack&) = delete;
public:
CurOpStack() : _base(nullptr, this) {}
diff --git a/src/mongo/db/curop.h b/src/mongo/db/curop.h
index 26b295e45a6..b450928814b 100644
--- a/src/mongo/db/curop.h
+++ b/src/mongo/db/curop.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/clientcursor.h"
#include "mongo/db/commands.h"
#include "mongo/db/cursor_id.h"
@@ -221,7 +220,8 @@ public:
* any synchronization.
*/
class CurOp {
- MONGO_DISALLOW_COPYING(CurOp);
+ CurOp(const CurOp&) = delete;
+ CurOp& operator=(const CurOp&) = delete;
public:
static CurOp* get(const OperationContext* opCtx);
diff --git a/src/mongo/db/database_index_builds_tracker.h b/src/mongo/db/database_index_builds_tracker.h
index 000a58d9bde..b91ab826527 100644
--- a/src/mongo/db/database_index_builds_tracker.h
+++ b/src/mongo/db/database_index_builds_tracker.h
@@ -32,7 +32,6 @@
#include <map>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl_index_build_state.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/util/concurrency/with_lock.h"
diff --git a/src/mongo/db/db_raii.h b/src/mongo/db/db_raii.h
index fbcb12f2bca..e6293022bf7 100644
--- a/src/mongo/db/db_raii.h
+++ b/src/mongo/db/db_raii.h
@@ -43,7 +43,8 @@ namespace mongo {
* desired.
*/
class AutoStatsTracker {
- MONGO_DISALLOW_COPYING(AutoStatsTracker);
+ AutoStatsTracker(const AutoStatsTracker&) = delete;
+ AutoStatsTracker& operator=(const AutoStatsTracker&) = delete;
public:
/**
@@ -94,7 +95,8 @@ private:
* snapshot to become available.
*/
class AutoGetCollectionForRead {
- MONGO_DISALLOW_COPYING(AutoGetCollectionForRead);
+ AutoGetCollectionForRead(const AutoGetCollectionForRead&) = delete;
+ AutoGetCollectionForRead& operator=(const AutoGetCollectionForRead&) = delete;
public:
AutoGetCollectionForRead(
@@ -149,7 +151,8 @@ private:
* ensure the CurrentOp object has the right namespace and has started its timer.
*/
class AutoGetCollectionForReadCommand {
- MONGO_DISALLOW_COPYING(AutoGetCollectionForReadCommand);
+ AutoGetCollectionForReadCommand(const AutoGetCollectionForReadCommand&) = delete;
+ AutoGetCollectionForReadCommand& operator=(const AutoGetCollectionForReadCommand&) = delete;
public:
AutoGetCollectionForReadCommand(
@@ -185,7 +188,8 @@ private:
* current operation.
*/
class OldClientContext {
- MONGO_DISALLOW_COPYING(OldClientContext);
+ OldClientContext(const OldClientContext&) = delete;
+ OldClientContext& operator=(const OldClientContext&) = delete;
public:
OldClientContext(OperationContext* opCtx, const std::string& ns, bool doVersion = true);
diff --git a/src/mongo/db/dbdirectclient.cpp b/src/mongo/db/dbdirectclient.cpp
index f0609042f37..0b0671b4ecf 100644
--- a/src/mongo/db/dbdirectclient.cpp
+++ b/src/mongo/db/dbdirectclient.cpp
@@ -54,7 +54,8 @@ using std::string;
namespace {
class DirectClientScope {
- MONGO_DISALLOW_COPYING(DirectClientScope);
+ DirectClientScope(const DirectClientScope&) = delete;
+ DirectClientScope& operator=(const DirectClientScope&) = delete;
public:
explicit DirectClientScope(OperationContext* opCtx)
diff --git a/src/mongo/db/dbmessage.h b/src/mongo/db/dbmessage.h
index ad203c21ae2..69fdfd7375a 100644
--- a/src/mongo/db/dbmessage.h
+++ b/src/mongo/db/dbmessage.h
@@ -452,7 +452,8 @@ struct DbResponse {
* command responses that don't use the new dbMsg protocol.
*/
class OpQueryReplyBuilder {
- MONGO_DISALLOW_COPYING(OpQueryReplyBuilder);
+ OpQueryReplyBuilder(const OpQueryReplyBuilder&) = delete;
+ OpQueryReplyBuilder& operator=(const OpQueryReplyBuilder&) = delete;
public:
OpQueryReplyBuilder();
diff --git a/src/mongo/db/exec/delete.h b/src/mongo/db/exec/delete.h
index b36067d0bd1..139239d9de0 100644
--- a/src/mongo/db/exec/delete.h
+++ b/src/mongo/db/exec/delete.h
@@ -95,7 +95,8 @@ struct DeleteStageParams {
* had the replication coordinator approve the write).
*/
class DeleteStage final : public RequiresMutableCollectionStage {
- MONGO_DISALLOW_COPYING(DeleteStage);
+ DeleteStage(const DeleteStage&) = delete;
+ DeleteStage& operator=(const DeleteStage&) = delete;
public:
DeleteStage(OperationContext* opCtx,
diff --git a/src/mongo/db/exec/plan_stats.h b/src/mongo/db/exec/plan_stats.h
index fb66bd4431e..da1f5b998d1 100644
--- a/src/mongo/db/exec/plan_stats.h
+++ b/src/mongo/db/exec/plan_stats.h
@@ -34,7 +34,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/index/multikey_paths.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/query/stage_types.h"
@@ -133,7 +132,8 @@ struct PlanStageStats {
std::vector<std::unique_ptr<PlanStageStats>> children;
private:
- MONGO_DISALLOW_COPYING(PlanStageStats);
+ PlanStageStats(const PlanStageStats&) = delete;
+ PlanStageStats& operator=(const PlanStageStats&) = delete;
};
struct AndHashStats : public SpecificStats {
diff --git a/src/mongo/db/exec/scoped_timer.h b/src/mongo/db/exec/scoped_timer.h
index 660bb8d7daa..33ddb192873 100644
--- a/src/mongo/db/exec/scoped_timer.h
+++ b/src/mongo/db/exec/scoped_timer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/time_support.h"
@@ -42,7 +41,8 @@ class ClockSource;
* construction when it goes out of scope.
*/
class ScopedTimer {
- MONGO_DISALLOW_COPYING(ScopedTimer);
+ ScopedTimer(const ScopedTimer&) = delete;
+ ScopedTimer& operator=(const ScopedTimer&) = delete;
public:
ScopedTimer(ClockSource* cs, long long* counter);
diff --git a/src/mongo/db/exec/subplan.h b/src/mongo/db/exec/subplan.h
index 62ac89d6644..f07d8f5815c 100644
--- a/src/mongo/db/exec/subplan.h
+++ b/src/mongo/db/exec/subplan.h
@@ -132,7 +132,8 @@ private:
* a particular $or branch.
*/
struct BranchPlanningResult {
- MONGO_DISALLOW_COPYING(BranchPlanningResult);
+ BranchPlanningResult(const BranchPlanningResult&) = delete;
+ BranchPlanningResult& operator=(const BranchPlanningResult&) = delete;
public:
BranchPlanningResult() {}
diff --git a/src/mongo/db/exec/update_stage.h b/src/mongo/db/exec/update_stage.h
index 1a37554bee2..457e9e550d0 100644
--- a/src/mongo/db/exec/update_stage.h
+++ b/src/mongo/db/exec/update_stage.h
@@ -77,7 +77,8 @@ private:
* Callers of doWork() must be holding a write lock.
*/
class UpdateStage final : public RequiresMutableCollectionStage {
- MONGO_DISALLOW_COPYING(UpdateStage);
+ UpdateStage(const UpdateStage&) = delete;
+ UpdateStage& operator=(const UpdateStage&) = delete;
public:
UpdateStage(OperationContext* opCtx,
diff --git a/src/mongo/db/exec/working_set.h b/src/mongo/db/exec/working_set.h
index 248ab944517..fc6a228036d 100644
--- a/src/mongo/db/exec/working_set.h
+++ b/src/mongo/db/exec/working_set.h
@@ -32,7 +32,6 @@
#include "boost/optional.hpp"
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/record_id.h"
#include "mongo/db/storage/snapshot.h"
@@ -51,7 +50,8 @@ typedef size_t WorkingSetID;
* from the working set, or mutate elements in the working set.
*/
class WorkingSet {
- MONGO_DISALLOW_COPYING(WorkingSet);
+ WorkingSet(const WorkingSet&) = delete;
+ WorkingSet& operator=(const WorkingSet&) = delete;
public:
static const WorkingSetID INVALID_ID = WorkingSetID(-1);
@@ -208,7 +208,8 @@ enum WorkingSetComputedDataType {
* Data that is a computed function of a WSM.
*/
class WorkingSetComputedData {
- MONGO_DISALLOW_COPYING(WorkingSetComputedData);
+ WorkingSetComputedData(const WorkingSetComputedData&) = delete;
+ WorkingSetComputedData& operator=(const WorkingSetComputedData&) = delete;
public:
WorkingSetComputedData(const WorkingSetComputedDataType type) : _type(type) {}
@@ -234,7 +235,8 @@ private:
* A WorkingSetMember may have any of the data above.
*/
class WorkingSetMember {
- MONGO_DISALLOW_COPYING(WorkingSetMember);
+ WorkingSetMember(const WorkingSetMember&) = delete;
+ WorkingSetMember& operator=(const WorkingSetMember&) = delete;
public:
WorkingSetMember();
diff --git a/src/mongo/db/field_ref_set.h b/src/mongo/db/field_ref_set.h
index 795799f70f5..63166acbc89 100644
--- a/src/mongo/db/field_ref_set.h
+++ b/src/mongo/db/field_ref_set.h
@@ -32,7 +32,6 @@
#include <set>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/owned_pointer_vector.h"
#include "mongo/base/status.h"
#include "mongo/db/field_ref.h"
@@ -50,7 +49,8 @@ namespace mongo {
* FieldRefSets do not own the FieldRef paths they contain.
*/
class FieldRefSet {
- MONGO_DISALLOW_COPYING(FieldRefSet);
+ FieldRefSet(const FieldRefSet&) = delete;
+ FieldRefSet& operator=(const FieldRefSet&) = delete;
struct FieldRefPtrLessThan {
bool operator()(const FieldRef* lhs, const FieldRef* rhs) const;
diff --git a/src/mongo/db/free_mon/free_mon_op_observer.h b/src/mongo/db/free_mon/free_mon_op_observer.h
index 0a2ca1ca1e7..7b17ebd014b 100644
--- a/src/mongo/db/free_mon/free_mon_op_observer.h
+++ b/src/mongo/db/free_mon/free_mon_op_observer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/op_observer.h"
namespace mongo {
@@ -39,7 +38,8 @@ namespace mongo {
* relevant entries for free monitoring.
*/
class FreeMonOpObserver final : public OpObserver {
- MONGO_DISALLOW_COPYING(FreeMonOpObserver);
+ FreeMonOpObserver(const FreeMonOpObserver&) = delete;
+ FreeMonOpObserver& operator=(const FreeMonOpObserver&) = delete;
public:
FreeMonOpObserver();
diff --git a/src/mongo/db/ftdc/block_compressor.h b/src/mongo/db/ftdc/block_compressor.h
index 3d1fb8da101..2b2173d09b7 100644
--- a/src/mongo/db/ftdc/block_compressor.h
+++ b/src/mongo/db/ftdc/block_compressor.h
@@ -33,7 +33,6 @@
#include <vector>
#include "mongo/base/data_range.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
namespace mongo {
@@ -42,7 +41,8 @@ namespace mongo {
* Compesses and uncompresses a block of buffer using zlib.
*/
class BlockCompressor {
- MONGO_DISALLOW_COPYING(BlockCompressor);
+ BlockCompressor(const BlockCompressor&) = delete;
+ BlockCompressor& operator=(const BlockCompressor&) = delete;
public:
BlockCompressor() = default;
diff --git a/src/mongo/db/ftdc/collector.h b/src/mongo/db/ftdc/collector.h
index 2e56318d588..d422abfc1e8 100644
--- a/src/mongo/db/ftdc/collector.h
+++ b/src/mongo/db/ftdc/collector.h
@@ -33,7 +33,6 @@
#include <tuple>
#include <vector>
-#include "mongo/base/disallow_copying.h"
namespace mongo {
@@ -49,7 +48,8 @@ class OperationContext;
* Provides an interface to collect BSONObjs from system providers
*/
class FTDCCollectorInterface {
- MONGO_DISALLOW_COPYING(FTDCCollectorInterface);
+ FTDCCollectorInterface(const FTDCCollectorInterface&) = delete;
+ FTDCCollectorInterface& operator=(const FTDCCollectorInterface&) = delete;
public:
virtual ~FTDCCollectorInterface() = default;
@@ -79,7 +79,8 @@ protected:
* Not Thread-Safe. Locking is owner's responsibility.
*/
class FTDCCollectorCollection {
- MONGO_DISALLOW_COPYING(FTDCCollectorCollection);
+ FTDCCollectorCollection(const FTDCCollectorCollection&) = delete;
+ FTDCCollectorCollection& operator=(const FTDCCollectorCollection&) = delete;
public:
FTDCCollectorCollection() = default;
diff --git a/src/mongo/db/ftdc/compressor.h b/src/mongo/db/ftdc/compressor.h
index 400f51f307c..6af25dc20c1 100644
--- a/src/mongo/db/ftdc/compressor.h
+++ b/src/mongo/db/ftdc/compressor.h
@@ -35,7 +35,6 @@
#include <tuple>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/util/builder.h"
#include "mongo/db/ftdc/block_compressor.h"
@@ -61,7 +60,8 @@ namespace mongo {
* across all documents in the series of documents.
*/
class FTDCCompressor {
- MONGO_DISALLOW_COPYING(FTDCCompressor);
+ FTDCCompressor(const FTDCCompressor&) = delete;
+ FTDCCompressor& operator=(const FTDCCompressor&) = delete;
public:
/**
diff --git a/src/mongo/db/ftdc/controller.h b/src/mongo/db/ftdc/controller.h
index fafc98cc531..26d76b28ad7 100644
--- a/src/mongo/db/ftdc/controller.h
+++ b/src/mongo/db/ftdc/controller.h
@@ -33,7 +33,6 @@
#include <cstdint>
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/ftdc/collector.h"
#include "mongo/db/ftdc/config.h"
#include "mongo/db/ftdc/file_manager.h"
@@ -53,7 +52,8 @@ class ServiceContext;
* Exposes an methods to response to configuration changes in a thread-safe manner.
*/
class FTDCController {
- MONGO_DISALLOW_COPYING(FTDCController);
+ FTDCController(const FTDCController&) = delete;
+ FTDCController& operator=(const FTDCController&) = delete;
public:
FTDCController(const boost::filesystem::path path, FTDCConfig config)
diff --git a/src/mongo/db/ftdc/decompressor.h b/src/mongo/db/ftdc/decompressor.h
index f8b03aa30bf..7481cf2b4e9 100644
--- a/src/mongo/db/ftdc/decompressor.h
+++ b/src/mongo/db/ftdc/decompressor.h
@@ -32,7 +32,6 @@
#include <vector>
#include "mongo/base/data_range.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/ftdc/block_compressor.h"
#include "mongo/db/jsobj.h"
@@ -43,7 +42,8 @@ namespace mongo {
* Inflates a compressed chunk of metrics into a list of BSON documents
*/
class FTDCDecompressor {
- MONGO_DISALLOW_COPYING(FTDCDecompressor);
+ FTDCDecompressor(const FTDCDecompressor&) = delete;
+ FTDCDecompressor& operator=(const FTDCDecompressor&) = delete;
public:
FTDCDecompressor() = default;
diff --git a/src/mongo/db/ftdc/file_manager.h b/src/mongo/db/ftdc/file_manager.h
index bf160c69870..ed9a586977e 100644
--- a/src/mongo/db/ftdc/file_manager.h
+++ b/src/mongo/db/ftdc/file_manager.h
@@ -34,7 +34,6 @@
#include <tuple>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/string_data.h"
#include "mongo/db/ftdc/collector.h"
@@ -53,7 +52,8 @@ class Client;
* Manages file rotation, and directory size management.
*/
class FTDCFileManager {
- MONGO_DISALLOW_COPYING(FTDCFileManager);
+ FTDCFileManager(const FTDCFileManager&) = delete;
+ FTDCFileManager& operator=(const FTDCFileManager&) = delete;
public:
~FTDCFileManager();
diff --git a/src/mongo/db/ftdc/file_reader.h b/src/mongo/db/ftdc/file_reader.h
index b768fcb06ea..caa94bfdc82 100644
--- a/src/mongo/db/ftdc/file_reader.h
+++ b/src/mongo/db/ftdc/file_reader.h
@@ -35,7 +35,6 @@
#include <stddef.h>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/db/ftdc/decompressor.h"
@@ -50,7 +49,8 @@ namespace mongo {
* Does not recover interim files into archive files.
*/
class FTDCFileReader {
- MONGO_DISALLOW_COPYING(FTDCFileReader);
+ FTDCFileReader(const FTDCFileReader&) = delete;
+ FTDCFileReader& operator=(const FTDCFileReader&) = delete;
public:
FTDCFileReader() : _state(State::kNeedsDoc) {}
diff --git a/src/mongo/db/ftdc/file_writer.h b/src/mongo/db/ftdc/file_writer.h
index 5d958e69286..9a7a8fa5e7d 100644
--- a/src/mongo/db/ftdc/file_writer.h
+++ b/src/mongo/db/ftdc/file_writer.h
@@ -59,7 +59,8 @@ namespace mongo {
* File rotation and cleanup is not handled by this class.
*/
class FTDCFileWriter {
- MONGO_DISALLOW_COPYING(FTDCFileWriter);
+ FTDCFileWriter(const FTDCFileWriter&) = delete;
+ FTDCFileWriter& operator=(const FTDCFileWriter&) = delete;
public:
FTDCFileWriter(const FTDCConfig* config) : _config(config), _compressor(_config) {}
diff --git a/src/mongo/db/fts/fts_basic_phrase_matcher.h b/src/mongo/db/fts/fts_basic_phrase_matcher.h
index 3784b50e616..dfab41a6119 100644
--- a/src/mongo/db/fts/fts_basic_phrase_matcher.h
+++ b/src/mongo/db/fts/fts_basic_phrase_matcher.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/fts/fts_phrase_matcher.h"
namespace mongo {
@@ -41,7 +40,8 @@ namespace fts {
* operations are inherently diacritic sensitive.
*/
class BasicFTSPhraseMatcher final : public FTSPhraseMatcher {
- MONGO_DISALLOW_COPYING(BasicFTSPhraseMatcher);
+ BasicFTSPhraseMatcher(const BasicFTSPhraseMatcher&) = delete;
+ BasicFTSPhraseMatcher& operator=(const BasicFTSPhraseMatcher&) = delete;
public:
BasicFTSPhraseMatcher() = default;
diff --git a/src/mongo/db/fts/fts_basic_tokenizer.h b/src/mongo/db/fts/fts_basic_tokenizer.h
index c9f8f61e0ec..d3f7851034e 100644
--- a/src/mongo/db/fts/fts_basic_tokenizer.h
+++ b/src/mongo/db/fts/fts_basic_tokenizer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/db/fts/fts_tokenizer.h"
#include "mongo/db/fts/stemmer.h"
@@ -58,7 +57,8 @@ class StopWords;
* generated by the BasicFTSTokenizer are ineherently diacritic sensitive.
*/
class BasicFTSTokenizer final : public FTSTokenizer {
- MONGO_DISALLOW_COPYING(BasicFTSTokenizer);
+ BasicFTSTokenizer(const BasicFTSTokenizer&) = delete;
+ BasicFTSTokenizer& operator=(const BasicFTSTokenizer&) = delete;
public:
BasicFTSTokenizer(const FTSLanguage* language);
diff --git a/src/mongo/db/fts/fts_language.h b/src/mongo/db/fts/fts_language.h
index a15adedb8e1..47a6ab2213d 100644
--- a/src/mongo/db/fts/fts_language.h
+++ b/src/mongo/db/fts/fts_language.h
@@ -69,7 +69,8 @@ class FTSTokenizer;
*/
class FTSLanguage {
// Use make() instead of copying.
- MONGO_DISALLOW_COPYING(FTSLanguage);
+ FTSLanguage(const FTSLanguage&) = delete;
+ FTSLanguage& operator=(const FTSLanguage&) = delete;
public:
/** Create an uninitialized language. */
diff --git a/src/mongo/db/fts/fts_matcher.h b/src/mongo/db/fts/fts_matcher.h
index 91eecf0d7e5..5dbcc981109 100644
--- a/src/mongo/db/fts/fts_matcher.h
+++ b/src/mongo/db/fts/fts_matcher.h
@@ -39,7 +39,8 @@ namespace mongo {
namespace fts {
class FTSMatcher {
- MONGO_DISALLOW_COPYING(FTSMatcher);
+ FTSMatcher(const FTSMatcher&) = delete;
+ FTSMatcher& operator=(const FTSMatcher&) = delete;
public:
FTSMatcher(const FTSQueryImpl& query, const FTSSpec& spec);
diff --git a/src/mongo/db/fts/fts_query_parser.h b/src/mongo/db/fts/fts_query_parser.h
index f607cef719c..f4bab3e7e1c 100644
--- a/src/mongo/db/fts/fts_query_parser.h
+++ b/src/mongo/db/fts/fts_query_parser.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
namespace mongo {
@@ -69,7 +68,8 @@ struct QueryToken {
* SPECIAL_CHARS = '-' | ' ' | '"'
*/
class FTSQueryParser {
- MONGO_DISALLOW_COPYING(FTSQueryParser);
+ FTSQueryParser(const FTSQueryParser&) = delete;
+ FTSQueryParser& operator=(const FTSQueryParser&) = delete;
public:
FTSQueryParser(StringData str);
diff --git a/src/mongo/db/fts/fts_tokenizer.h b/src/mongo/db/fts/fts_tokenizer.h
index 8d2c08727a1..cae883b7b09 100644
--- a/src/mongo/db/fts/fts_tokenizer.h
+++ b/src/mongo/db/fts/fts_tokenizer.h
@@ -32,7 +32,6 @@
#include <cstdint>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
namespace mongo {
diff --git a/src/mongo/db/fts/fts_unicode_phrase_matcher.h b/src/mongo/db/fts/fts_unicode_phrase_matcher.h
index bf3d16b71aa..de3ad3c11c8 100644
--- a/src/mongo/db/fts/fts_unicode_phrase_matcher.h
+++ b/src/mongo/db/fts/fts_unicode_phrase_matcher.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/fts/fts_phrase_matcher.h"
#include "mongo/db/fts/unicode/codepoints.h"
@@ -48,7 +47,8 @@ class FTSLanguage;
* case fold mapping), the phrase matcher will take that into account.
*/
class UnicodeFTSPhraseMatcher final : public FTSPhraseMatcher {
- MONGO_DISALLOW_COPYING(UnicodeFTSPhraseMatcher);
+ UnicodeFTSPhraseMatcher(const UnicodeFTSPhraseMatcher&) = delete;
+ UnicodeFTSPhraseMatcher& operator=(const UnicodeFTSPhraseMatcher&) = delete;
public:
UnicodeFTSPhraseMatcher(const std::string& language);
diff --git a/src/mongo/db/fts/fts_unicode_tokenizer.h b/src/mongo/db/fts/fts_unicode_tokenizer.h
index cededf1e4b7..0745e11ad07 100644
--- a/src/mongo/db/fts/fts_unicode_tokenizer.h
+++ b/src/mongo/db/fts/fts_unicode_tokenizer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/db/fts/fts_tokenizer.h"
#include "mongo/db/fts/stemmer.h"
@@ -56,7 +55,8 @@ class StopWords;
* Optionally supports returning case sensitive search terms.
*/
class UnicodeFTSTokenizer final : public FTSTokenizer {
- MONGO_DISALLOW_COPYING(UnicodeFTSTokenizer);
+ UnicodeFTSTokenizer(const UnicodeFTSTokenizer&) = delete;
+ UnicodeFTSTokenizer& operator=(const UnicodeFTSTokenizer&) = delete;
public:
UnicodeFTSTokenizer(const FTSLanguage* language);
diff --git a/src/mongo/db/fts/stemmer.h b/src/mongo/db/fts/stemmer.h
index e5b7d3c1158..a5a15174a94 100644
--- a/src/mongo/db/fts/stemmer.h
+++ b/src/mongo/db/fts/stemmer.h
@@ -44,7 +44,8 @@ namespace fts {
* running/Running -> run/Run
*/
class Stemmer {
- MONGO_DISALLOW_COPYING(Stemmer);
+ Stemmer(const Stemmer&) = delete;
+ Stemmer& operator=(const Stemmer&) = delete;
public:
Stemmer(const FTSLanguage* language);
diff --git a/src/mongo/db/fts/stop_words.h b/src/mongo/db/fts/stop_words.h
index 81d683aec8d..22835300226 100644
--- a/src/mongo/db/fts/stop_words.h
+++ b/src/mongo/db/fts/stop_words.h
@@ -41,7 +41,8 @@ namespace mongo {
namespace fts {
class StopWords {
- MONGO_DISALLOW_COPYING(StopWords);
+ StopWords(const StopWords&) = delete;
+ StopWords& operator=(const StopWords&) = delete;
public:
StopWords();
diff --git a/src/mongo/db/fts/tokenizer.h b/src/mongo/db/fts/tokenizer.h
index 68b8afb2881..1a0e79d9425 100644
--- a/src/mongo/db/fts/tokenizer.h
+++ b/src/mongo/db/fts/tokenizer.h
@@ -53,7 +53,8 @@ struct Token {
};
class Tokenizer {
- MONGO_DISALLOW_COPYING(Tokenizer);
+ Tokenizer(const Tokenizer&) = delete;
+ Tokenizer& operator=(const Tokenizer&) = delete;
public:
Tokenizer(const FTSLanguage* language, StringData str);
diff --git a/src/mongo/db/geo/geometry_container.h b/src/mongo/db/geo/geometry_container.h
index 0176eb04b18..971b55462ab 100644
--- a/src/mongo/db/geo/geometry_container.h
+++ b/src/mongo/db/geo/geometry_container.h
@@ -31,14 +31,14 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/geo/shapes.h"
#include "third_party/s2/s2regionunion.h"
namespace mongo {
class GeometryContainer {
- MONGO_DISALLOW_COPYING(GeometryContainer);
+ GeometryContainer(const GeometryContainer&) = delete;
+ GeometryContainer& operator=(const GeometryContainer&) = delete;
public:
/**
diff --git a/src/mongo/db/hasher.cpp b/src/mongo/db/hasher.cpp
index 1dbb65a12ae..731500afa40 100644
--- a/src/mongo/db/hasher.cpp
+++ b/src/mongo/db/hasher.cpp
@@ -47,7 +47,8 @@ namespace {
typedef unsigned char HashDigest[16];
class Hasher {
- MONGO_DISALLOW_COPYING(Hasher);
+ Hasher(const Hasher&) = delete;
+ Hasher& operator=(const Hasher&) = delete;
public:
explicit Hasher(HashSeed seed);
diff --git a/src/mongo/db/hasher.h b/src/mongo/db/hasher.h
index cf70b42f154..c35eac19d56 100644
--- a/src/mongo/db/hasher.h
+++ b/src/mongo/db/hasher.h
@@ -34,7 +34,6 @@
*/
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonelement.h"
namespace mongo {
@@ -42,7 +41,8 @@ namespace mongo {
typedef int HashSeed;
class BSONElementHasher {
- MONGO_DISALLOW_COPYING(BSONElementHasher);
+ BSONElementHasher(const BSONElementHasher&) = delete;
+ BSONElementHasher& operator=(const BSONElementHasher&) = delete;
public:
/* The hash function we use can be given a seed, to effectively randomize it
diff --git a/src/mongo/db/index/duplicate_key_tracker.h b/src/mongo/db/index/duplicate_key_tracker.h
index 3879cdb3486..c5399620984 100644
--- a/src/mongo/db/index/duplicate_key_tracker.h
+++ b/src/mongo/db/index/duplicate_key_tracker.h
@@ -32,7 +32,6 @@
#include <cstdint>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/catalog/index_catalog_entry.h"
#include "mongo/db/operation_context.h"
@@ -47,7 +46,8 @@ class IndexCatalogEntry;
* by a temporary table that is created and destroyed by this tracker.
*/
class DuplicateKeyTracker {
- MONGO_DISALLOW_COPYING(DuplicateKeyTracker);
+ DuplicateKeyTracker(const DuplicateKeyTracker&) = delete;
+ DuplicateKeyTracker& operator=(const DuplicateKeyTracker&) = delete;
public:
/**
diff --git a/src/mongo/db/index/index_access_method.h b/src/mongo/db/index/index_access_method.h
index 079af617fa1..527e73ed146 100644
--- a/src/mongo/db/index/index_access_method.h
+++ b/src/mongo/db/index/index_access_method.h
@@ -33,7 +33,6 @@
#include <memory>
#include <set>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/field_ref.h"
#include "mongo/db/index/index_descriptor.h"
@@ -65,7 +64,8 @@ bool failIndexKeyTooLongParam();
*
*/
class IndexAccessMethod {
- MONGO_DISALLOW_COPYING(IndexAccessMethod);
+ IndexAccessMethod(const IndexAccessMethod&) = delete;
+ IndexAccessMethod& operator=(const IndexAccessMethod&) = delete;
public:
IndexAccessMethod() = default;
@@ -433,7 +433,8 @@ struct InsertDeleteOptions {
* dependencies, it is important that IndexAccessMethod remain an interface.
*/
class AbstractIndexAccessMethod : public IndexAccessMethod {
- MONGO_DISALLOW_COPYING(AbstractIndexAccessMethod);
+ AbstractIndexAccessMethod(const AbstractIndexAccessMethod&) = delete;
+ AbstractIndexAccessMethod& operator=(const AbstractIndexAccessMethod&) = delete;
public:
/**
diff --git a/src/mongo/db/index_builds_coordinator.h b/src/mongo/db/index_builds_coordinator.h
index d49178017da..03dc441d3d7 100644
--- a/src/mongo/db/index_builds_coordinator.h
+++ b/src/mongo/db/index_builds_coordinator.h
@@ -458,7 +458,8 @@ protected:
* builds should be scheduled.
*/
class ScopedStopNewDatabaseIndexBuilds {
- MONGO_DISALLOW_COPYING(ScopedStopNewDatabaseIndexBuilds);
+ ScopedStopNewDatabaseIndexBuilds(const ScopedStopNewDatabaseIndexBuilds&) = delete;
+ ScopedStopNewDatabaseIndexBuilds& operator=(const ScopedStopNewDatabaseIndexBuilds&) = delete;
public:
/**
@@ -488,7 +489,9 @@ private:
* builds should be scheduled.
*/
class ScopedStopNewCollectionIndexBuilds {
- MONGO_DISALLOW_COPYING(ScopedStopNewCollectionIndexBuilds);
+ ScopedStopNewCollectionIndexBuilds(const ScopedStopNewCollectionIndexBuilds&) = delete;
+ ScopedStopNewCollectionIndexBuilds& operator=(const ScopedStopNewCollectionIndexBuilds&) =
+ delete;
public:
/**
diff --git a/src/mongo/db/index_builds_coordinator_mongod.h b/src/mongo/db/index_builds_coordinator_mongod.h
index 109e53eb028..03b5884cce3 100644
--- a/src/mongo/db/index_builds_coordinator_mongod.h
+++ b/src/mongo/db/index_builds_coordinator_mongod.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/index_builds_coordinator.h"
#include "mongo/util/concurrency/thread_pool.h"
@@ -48,7 +47,8 @@ class ServiceContext;
* accessible via the ServiceContext.
*/
class IndexBuildsCoordinatorMongod : public IndexBuildsCoordinator {
- MONGO_DISALLOW_COPYING(IndexBuildsCoordinatorMongod);
+ IndexBuildsCoordinatorMongod(const IndexBuildsCoordinatorMongod&) = delete;
+ IndexBuildsCoordinatorMongod& operator=(const IndexBuildsCoordinatorMongod&) = delete;
public:
/**
diff --git a/src/mongo/db/matcher/expression.h b/src/mongo/db/matcher/expression.h
index 9607dce1963..e3e3d652b4a 100644
--- a/src/mongo/db/matcher/expression.h
+++ b/src/mongo/db/matcher/expression.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/bsonobjbuilder.h"
@@ -56,7 +55,8 @@ class TreeMatchExpression;
typedef StatusWith<std::unique_ptr<MatchExpression>> StatusWithMatchExpression;
class MatchExpression {
- MONGO_DISALLOW_COPYING(MatchExpression);
+ MatchExpression(const MatchExpression&) = delete;
+ MatchExpression& operator=(const MatchExpression&) = delete;
public:
enum MatchType {
diff --git a/src/mongo/db/matcher/expression_geo.h b/src/mongo/db/matcher/expression_geo.h
index 37f4727bb1a..6d38f7fe320 100644
--- a/src/mongo/db/matcher/expression_geo.h
+++ b/src/mongo/db/matcher/expression_geo.h
@@ -42,7 +42,8 @@ class GeometryContainer;
// This represents either a $within or a $geoIntersects.
class GeoExpression {
- MONGO_DISALLOW_COPYING(GeoExpression);
+ GeoExpression(const GeoExpression&) = delete;
+ GeoExpression& operator=(const GeoExpression&) = delete;
public:
GeoExpression();
@@ -123,7 +124,8 @@ private:
// TODO: Make a struct, turn parse stuff into something like
// static Status parseNearQuery(const BSONObj& obj, NearQuery** out);
class GeoNearExpression {
- MONGO_DISALLOW_COPYING(GeoNearExpression);
+ GeoNearExpression(const GeoNearExpression&) = delete;
+ GeoNearExpression& operator=(const GeoNearExpression&) = delete;
public:
GeoNearExpression();
diff --git a/src/mongo/db/matcher/matcher.h b/src/mongo/db/matcher/matcher.h
index 5f28a70b921..ae39f597bf3 100644
--- a/src/mongo/db/matcher/matcher.h
+++ b/src/mongo/db/matcher/matcher.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/matcher/expression.h"
@@ -47,7 +46,8 @@ class CollatorInterface;
* Matcher is a simple wrapper around a BSONObj and the MatchExpression created from it.
*/
class Matcher {
- MONGO_DISALLOW_COPYING(Matcher);
+ Matcher(const Matcher&) = delete;
+ Matcher& operator=(const Matcher&) = delete;
public:
/**
diff --git a/src/mongo/db/op_observer.h b/src/mongo/db/op_observer.h
index dadbe435cc5..729908a287e 100644
--- a/src/mongo/db/op_observer.h
+++ b/src/mongo/db/op_observer.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/collection_options.h"
diff --git a/src/mongo/db/op_observer_impl.h b/src/mongo/db/op_observer_impl.h
index b2a4d52a223..29b319d77c7 100644
--- a/src/mongo/db/op_observer_impl.h
+++ b/src/mongo/db/op_observer_impl.h
@@ -34,7 +34,8 @@
namespace mongo {
class OpObserverImpl : public OpObserver {
- MONGO_DISALLOW_COPYING(OpObserverImpl);
+ OpObserverImpl(const OpObserverImpl&) = delete;
+ OpObserverImpl& operator=(const OpObserverImpl&) = delete;
public:
OpObserverImpl() = default;
diff --git a/src/mongo/db/op_observer_registry.h b/src/mongo/db/op_observer_registry.h
index d1c0713ab7d..a930b9aa608 100644
--- a/src/mongo/db/op_observer_registry.h
+++ b/src/mongo/db/op_observer_registry.h
@@ -45,7 +45,8 @@ namespace mongo {
* handler with the recovery unit.
*/
class OpObserverRegistry final : public OpObserver {
- MONGO_DISALLOW_COPYING(OpObserverRegistry);
+ OpObserverRegistry(const OpObserverRegistry&) = delete;
+ OpObserverRegistry& operator=(const OpObserverRegistry&) = delete;
public:
OpObserverRegistry() = default;
diff --git a/src/mongo/db/operation_context.h b/src/mongo/db/operation_context.h
index ffa9678d7a0..07a72c9a03d 100644
--- a/src/mongo/db/operation_context.h
+++ b/src/mongo/db/operation_context.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/client.h"
#include "mongo/db/concurrency/locker.h"
@@ -74,7 +73,8 @@ class UnreplicatedWritesBlock;
* RecoveryUnit and to allow better invariant checking.
*/
class OperationContext : public Interruptible, public Decorable<OperationContext> {
- MONGO_DISALLOW_COPYING(OperationContext);
+ OperationContext(const OperationContext&) = delete;
+ OperationContext& operator=(const OperationContext&) = delete;
public:
OperationContext(Client* client, unsigned int opId);
@@ -479,7 +479,8 @@ namespace repl {
* object is in scope.
*/
class UnreplicatedWritesBlock {
- MONGO_DISALLOW_COPYING(UnreplicatedWritesBlock);
+ UnreplicatedWritesBlock(const UnreplicatedWritesBlock&) = delete;
+ UnreplicatedWritesBlock& operator=(const UnreplicatedWritesBlock&) = delete;
public:
UnreplicatedWritesBlock(OperationContext* opCtx)
diff --git a/src/mongo/db/ops/delete_request.h b/src/mongo/db/ops/delete_request.h
index 1461bbf36b7..23b3bc81e42 100644
--- a/src/mongo/db/ops/delete_request.h
+++ b/src/mongo/db/ops/delete_request.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/query/plan_executor.h"
@@ -39,7 +38,8 @@
namespace mongo {
class DeleteRequest {
- MONGO_DISALLOW_COPYING(DeleteRequest);
+ DeleteRequest(const DeleteRequest&) = delete;
+ DeleteRequest& operator=(const DeleteRequest&) = delete;
public:
explicit DeleteRequest(const NamespaceString& nsString)
diff --git a/src/mongo/db/ops/parsed_delete.h b/src/mongo/db/ops/parsed_delete.h
index ae83fe9a783..73f4bef19e4 100644
--- a/src/mongo/db/ops/parsed_delete.h
+++ b/src/mongo/db/ops/parsed_delete.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/query/plan_executor.h"
@@ -55,7 +54,8 @@ class OperationContext;
* No locks need to be held during parsing.
*/
class ParsedDelete {
- MONGO_DISALLOW_COPYING(ParsedDelete);
+ ParsedDelete(const ParsedDelete&) = delete;
+ ParsedDelete& operator=(const ParsedDelete&) = delete;
public:
/**
diff --git a/src/mongo/db/ops/parsed_update.h b/src/mongo/db/ops/parsed_update.h
index 77220b5211f..da983db9f1f 100644
--- a/src/mongo/db/ops/parsed_update.h
+++ b/src/mongo/db/ops/parsed_update.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/matcher/expression_with_placeholder.h"
#include "mongo/db/query/collation/collator_interface.h"
@@ -57,7 +56,8 @@ class UpdateRequest;
* using the UpdateDriver.
*/
class ParsedUpdate {
- MONGO_DISALLOW_COPYING(ParsedUpdate);
+ ParsedUpdate(const ParsedUpdate&) = delete;
+ ParsedUpdate& operator=(const ParsedUpdate&) = delete;
public:
/**
diff --git a/src/mongo/db/pipeline/document.h b/src/mongo/db/pipeline/document.h
index 7efd5994ff7..0c64c108329 100644
--- a/src/mongo/db/pipeline/document.h
+++ b/src/mongo/db/pipeline/document.h
@@ -412,7 +412,8 @@ private:
* Documents.
*/
class MutableDocument {
- MONGO_DISALLOW_COPYING(MutableDocument);
+ MutableDocument(const MutableDocument&) = delete;
+ MutableDocument& operator=(const MutableDocument&) = delete;
public:
/** Create a new empty Document.
diff --git a/src/mongo/db/pipeline/document_internal.h b/src/mongo/db/pipeline/document_internal.h
index 5069927b80e..b5030b77693 100644
--- a/src/mongo/db/pipeline/document_internal.h
+++ b/src/mongo/db/pipeline/document_internal.h
@@ -76,7 +76,8 @@ private:
* Internal class. Consumers shouldn't care about this.
*/
class ValueElement {
- MONGO_DISALLOW_COPYING(ValueElement);
+ ValueElement(const ValueElement&) = delete;
+ ValueElement& operator=(const ValueElement&) = delete;
public:
Value val;
diff --git a/src/mongo/db/pipeline/document_source_change_stream_transform.h b/src/mongo/db/pipeline/document_source_change_stream_transform.h
index 51049050505..ca1003128fd 100644
--- a/src/mongo/db/pipeline/document_source_change_stream_transform.h
+++ b/src/mongo/db/pipeline/document_source_change_stream_transform.h
@@ -90,7 +90,8 @@ private:
* which was created as part of a transaction.
*/
struct TransactionContext {
- MONGO_DISALLOW_COPYING(TransactionContext);
+ TransactionContext(const TransactionContext&) = delete;
+ TransactionContext& operator=(const TransactionContext&) = delete;
// The array of oplog entries from an 'applyOps' representing the transaction. Only kept
// around so that the underlying memory of 'arr' isn't freed.
diff --git a/src/mongo/db/pipeline/sequential_document_cache.h b/src/mongo/db/pipeline/sequential_document_cache.h
index d54174aa75e..b59c70412b7 100644
--- a/src/mongo/db/pipeline/sequential_document_cache.h
+++ b/src/mongo/db/pipeline/sequential_document_cache.h
@@ -44,7 +44,8 @@ namespace mongo {
* three states: building, serving, or abandoned. See SequentialDocumentCache::CacheStatus.
*/
class SequentialDocumentCache {
- MONGO_DISALLOW_COPYING(SequentialDocumentCache);
+ SequentialDocumentCache(const SequentialDocumentCache&) = delete;
+ SequentialDocumentCache& operator=(const SequentialDocumentCache&) = delete;
public:
explicit SequentialDocumentCache(size_t maxCacheSizeBytes) : _maxSizeBytes(maxCacheSizeBytes) {}
diff --git a/src/mongo/db/query/collation/collation_index_key.cpp b/src/mongo/db/query/collation/collation_index_key.cpp
index b2407b58ead..3af408e8abd 100644
--- a/src/mongo/db/query/collation/collation_index_key.cpp
+++ b/src/mongo/db/query/collation/collation_index_key.cpp
@@ -33,7 +33,6 @@
#include <stack>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/bsonobjbuilder.h"
#include "mongo/bson/util/builder.h"
@@ -49,7 +48,8 @@ namespace {
// holds necessary information for in-progress translations. TranslateContexts are held by a
// TranslateStack, which acts like a heap-allocated call stack.
class TranslateContext {
- MONGO_DISALLOW_COPYING(TranslateContext);
+ TranslateContext(const TranslateContext&) = delete;
+ TranslateContext& operator=(const TranslateContext&) = delete;
public:
TranslateContext(BSONObjIterator&& iter, BufBuilder* buf)
diff --git a/src/mongo/db/query/collation/collator_factory_interface.h b/src/mongo/db/query/collation/collator_factory_interface.h
index 8c3eef698f9..193e350ed0e 100644
--- a/src/mongo/db/query/collation/collator_factory_interface.h
+++ b/src/mongo/db/query/collation/collator_factory_interface.h
@@ -31,7 +31,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/query/collation/collator_interface.h"
namespace mongo {
@@ -45,7 +44,8 @@ class StatusWith;
* An interface which can be used to retrieve a collator.
*/
class CollatorFactoryInterface {
- MONGO_DISALLOW_COPYING(CollatorFactoryInterface);
+ CollatorFactoryInterface(const CollatorFactoryInterface&) = delete;
+ CollatorFactoryInterface& operator=(const CollatorFactoryInterface&) = delete;
public:
CollatorFactoryInterface() = default;
diff --git a/src/mongo/db/query/collation/collator_interface.h b/src/mongo/db/query/collation/collator_interface.h
index 6b098340278..7cba6aa2bb1 100644
--- a/src/mongo/db/query/collation/collator_interface.h
+++ b/src/mongo/db/query/collation/collator_interface.h
@@ -32,7 +32,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/base/string_data_comparator_interface.h"
#include "mongo/bson/bsonobj_comparator_interface.h"
@@ -49,7 +48,8 @@ namespace mongo {
* Does not throw exceptions.
*/
class CollatorInterface : public StringData::ComparatorInterface {
- MONGO_DISALLOW_COPYING(CollatorInterface);
+ CollatorInterface(const CollatorInterface&) = delete;
+ CollatorInterface& operator=(const CollatorInterface&) = delete;
public:
/**
diff --git a/src/mongo/db/query/cursor_response.h b/src/mongo/db/query/cursor_response.h
index 6412ab38e0b..b44ea0baba4 100644
--- a/src/mongo/db/query/cursor_response.h
+++ b/src/mongo/db/query/cursor_response.h
@@ -31,7 +31,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/clientcursor.h"
@@ -46,7 +45,8 @@ namespace mongo {
* command in place.
*/
class CursorResponseBuilder {
- MONGO_DISALLOW_COPYING(CursorResponseBuilder);
+ CursorResponseBuilder(const CursorResponseBuilder&) = delete;
+ CursorResponseBuilder& operator=(const CursorResponseBuilder&) = delete;
public:
/**
@@ -162,7 +162,8 @@ class CursorResponse {
// TODO SERVER-32467 Remove this ifndef once the compiler has been fixed and the workaround has been
// removed.
#ifndef __s390x__
- MONGO_DISALLOW_COPYING(CursorResponse);
+ CursorResponse(const CursorResponse&) = delete;
+ CursorResponse& operator=(const CursorResponse&) = delete;
#endif
public:
diff --git a/src/mongo/db/query/datetime/date_time_support.h b/src/mongo/db/query/datetime/date_time_support.h
index 42697027cac..94ac4c4d08e 100644
--- a/src/mongo/db/query/datetime/date_time_support.h
+++ b/src/mongo/db/query/datetime/date_time_support.h
@@ -32,7 +32,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/service_context.h"
#include "mongo/util/string_map.h"
#include "mongo/util/time_support.h"
@@ -332,7 +331,8 @@ private:
* accessed via the global service context.
*/
class TimeZoneDatabase {
- MONGO_DISALLOW_COPYING(TimeZoneDatabase);
+ TimeZoneDatabase(const TimeZoneDatabase&) = delete;
+ TimeZoneDatabase& operator=(const TimeZoneDatabase&) = delete;
public:
/**
diff --git a/src/mongo/db/query/plan_cache.h b/src/mongo/db/query/plan_cache.h
index 85199403d91..3c904ec3794 100644
--- a/src/mongo/db/query/plan_cache.h
+++ b/src/mongo/db/query/plan_cache.h
@@ -241,7 +241,8 @@ class PlanCacheEntry;
*/
class CachedSolution {
private:
- MONGO_DISALLOW_COPYING(CachedSolution);
+ CachedSolution(const CachedSolution&) = delete;
+ CachedSolution& operator=(const CachedSolution&) = delete;
public:
CachedSolution(const PlanCacheKey& key, const PlanCacheEntry& entry);
@@ -275,7 +276,8 @@ public:
*/
class PlanCacheEntry {
private:
- MONGO_DISALLOW_COPYING(PlanCacheEntry);
+ PlanCacheEntry(const PlanCacheEntry&) = delete;
+ PlanCacheEntry& operator=(const PlanCacheEntry&) = delete;
public:
/**
@@ -354,7 +356,8 @@ public:
*/
class PlanCache {
private:
- MONGO_DISALLOW_COPYING(PlanCache);
+ PlanCache(const PlanCache&) = delete;
+ PlanCache& operator=(const PlanCache&) = delete;
public:
// We have three states for a cache entry to be in. Rather than just 'present' or 'not
diff --git a/src/mongo/db/query/plan_cache_indexability.h b/src/mongo/db/query/plan_cache_indexability.h
index c38c3dd2d05..5c78dabd3d7 100644
--- a/src/mongo/db/query/plan_cache_indexability.h
+++ b/src/mongo/db/query/plan_cache_indexability.h
@@ -31,7 +31,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/exec/projection_exec_agg.h"
#include "mongo/stdx/functional.h"
#include "mongo/util/string_map.h"
@@ -82,7 +81,8 @@ private:
* expressions based on the data values in the expression.
*/
class PlanCacheIndexabilityState {
- MONGO_DISALLOW_COPYING(PlanCacheIndexabilityState);
+ PlanCacheIndexabilityState(const PlanCacheIndexabilityState&) = delete;
+ PlanCacheIndexabilityState& operator=(const PlanCacheIndexabilityState&) = delete;
public:
PlanCacheIndexabilityState() = default;
diff --git a/src/mongo/db/query/plan_enumerator.h b/src/mongo/db/query/plan_enumerator.h
index d58b0206f41..0ae89741132 100644
--- a/src/mongo/db/query/plan_enumerator.h
+++ b/src/mongo/db/query/plan_enumerator.h
@@ -31,7 +31,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/query/canonical_query.h"
#include "mongo/db/query/index_entry.h"
@@ -73,7 +72,8 @@ struct PlanEnumeratorParams {
* predicate information to make better decisions about what indices are best.
*/
class PlanEnumerator {
- MONGO_DISALLOW_COPYING(PlanEnumerator);
+ PlanEnumerator(const PlanEnumerator&) = delete;
+ PlanEnumerator& operator=(const PlanEnumerator&) = delete;
public:
/**
diff --git a/src/mongo/db/query/plan_executor_impl.h b/src/mongo/db/query/plan_executor_impl.h
index 673abf6dc55..1b4dfda3dda 100644
--- a/src/mongo/db/query/plan_executor_impl.h
+++ b/src/mongo/db/query/plan_executor_impl.h
@@ -32,13 +32,13 @@
#include <boost/optional.hpp>
#include <queue>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/query/plan_executor.h"
namespace mongo {
class PlanExecutorImpl : public PlanExecutor {
- MONGO_DISALLOW_COPYING(PlanExecutorImpl);
+ PlanExecutorImpl(const PlanExecutorImpl&) = delete;
+ PlanExecutorImpl& operator=(const PlanExecutorImpl&) = delete;
public:
/**
diff --git a/src/mongo/db/query/query_settings.h b/src/mongo/db/query/query_settings.h
index 4c859b74791..4fac8e39161 100644
--- a/src/mongo/db/query/query_settings.h
+++ b/src/mongo/db/query/query_settings.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/query/canonical_query.h"
@@ -48,7 +47,8 @@ namespace mongo {
*/
class AllowedIndicesFilter {
private:
- MONGO_DISALLOW_COPYING(AllowedIndicesFilter);
+ AllowedIndicesFilter(const AllowedIndicesFilter&) = delete;
+ AllowedIndicesFilter& operator=(const AllowedIndicesFilter&) = delete;
public:
AllowedIndicesFilter(const BSONObjSet& indexKeyPatterns,
@@ -107,7 +107,8 @@ public:
*/
class QuerySettings {
private:
- MONGO_DISALLOW_COPYING(QuerySettings);
+ QuerySettings(const QuerySettings&) = delete;
+ QuerySettings& operator=(const QuerySettings&) = delete;
public:
QuerySettings() = default;
diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h
index 7bff63bf725..04e6cd6d997 100644
--- a/src/mongo/db/query/query_solution.h
+++ b/src/mongo/db/query/query_solution.h
@@ -188,7 +188,8 @@ protected:
void addCommon(mongoutils::str::stream* ss, int indent) const;
private:
- MONGO_DISALLOW_COPYING(QuerySolutionNode);
+ QuerySolutionNode(const QuerySolutionNode&) = delete;
+ QuerySolutionNode& operator=(const QuerySolutionNode&) = delete;
};
/**
@@ -238,7 +239,8 @@ struct QuerySolution {
}
private:
- MONGO_DISALLOW_COPYING(QuerySolution);
+ QuerySolution(const QuerySolution&) = delete;
+ QuerySolution& operator=(const QuerySolution&) = delete;
};
struct TextNode : public QuerySolutionNode {
diff --git a/src/mongo/db/repl/abstract_async_component.h b/src/mongo/db/repl/abstract_async_component.h
index b853efd87f8..8d5e784b591 100644
--- a/src/mongo/db/repl/abstract_async_component.h
+++ b/src/mongo/db/repl/abstract_async_component.h
@@ -34,7 +34,6 @@
#include <string>
#include <type_traits>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/static_assert.h"
#include "mongo/base/status.h"
#include "mongo/executor/task_executor.h"
@@ -53,7 +52,8 @@ namespace repl {
* _getMutex()).
*/
class AbstractAsyncComponent {
- MONGO_DISALLOW_COPYING(AbstractAsyncComponent);
+ AbstractAsyncComponent(const AbstractAsyncComponent&) = delete;
+ AbstractAsyncComponent& operator=(const AbstractAsyncComponent&) = delete;
public:
AbstractAsyncComponent(executor::TaskExecutor* executor, const std::string& componentName);
diff --git a/src/mongo/db/repl/abstract_oplog_fetcher.h b/src/mongo/db/repl/abstract_oplog_fetcher.h
index 1420a3ba77d..11d59fd82a8 100644
--- a/src/mongo/db/repl/abstract_oplog_fetcher.h
+++ b/src/mongo/db/repl/abstract_oplog_fetcher.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/client/fetcher.h"
#include "mongo/db/namespace_string.h"
@@ -51,7 +50,8 @@ namespace repl {
* fetcher. Subclasses also provide a callback to run on successful batches.
*/
class AbstractOplogFetcher : public AbstractAsyncComponent {
- MONGO_DISALLOW_COPYING(AbstractOplogFetcher);
+ AbstractOplogFetcher(const AbstractOplogFetcher&) = delete;
+ AbstractOplogFetcher& operator=(const AbstractOplogFetcher&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/abstract_oplog_fetcher_test.cpp b/src/mongo/db/repl/abstract_oplog_fetcher_test.cpp
index f6989555821..92d576daa20 100644
--- a/src/mongo/db/repl/abstract_oplog_fetcher_test.cpp
+++ b/src/mongo/db/repl/abstract_oplog_fetcher_test.cpp
@@ -511,7 +511,8 @@ TEST_F(AbstractOplogFetcherTest, OplogFetcherTimesOutCorrectlyOnRetriedFindReque
bool sharedCallbackStateDestroyed = false;
class SharedCallbackState {
- MONGO_DISALLOW_COPYING(SharedCallbackState);
+ SharedCallbackState(const SharedCallbackState&) = delete;
+ SharedCallbackState& operator=(const SharedCallbackState&) = delete;
public:
SharedCallbackState() {}
diff --git a/src/mongo/db/repl/abstract_oplog_fetcher_test_fixture.h b/src/mongo/db/repl/abstract_oplog_fetcher_test_fixture.h
index c4f9163778d..9d1ec170ec8 100644
--- a/src/mongo/db/repl/abstract_oplog_fetcher_test_fixture.h
+++ b/src/mongo/db/repl/abstract_oplog_fetcher_test_fixture.h
@@ -28,7 +28,6 @@
*/
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/abstract_oplog_fetcher.h"
#include "mongo/executor/thread_pool_task_executor_test_fixture.h"
#include "mongo/unittest/unittest.h"
@@ -40,7 +39,8 @@ namespace repl {
* This class represents the state at shutdown of an abstract oplog fetcher.
*/
class ShutdownState {
- MONGO_DISALLOW_COPYING(ShutdownState);
+ ShutdownState(const ShutdownState&) = delete;
+ ShutdownState& operator=(const ShutdownState&) = delete;
public:
ShutdownState();
diff --git a/src/mongo/db/repl/applier_helpers.h b/src/mongo/db/repl/applier_helpers.h
index 627bbd7b8a0..94ceffe894d 100644
--- a/src/mongo/db/repl/applier_helpers.h
+++ b/src/mongo/db/repl/applier_helpers.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/repl/multiapplier.h"
#include "mongo/db/repl/sync_tail.h"
@@ -61,7 +60,8 @@ public:
* successfully.
*/
class ApplierHelpers::InsertGroup {
- MONGO_DISALLOW_COPYING(InsertGroup);
+ InsertGroup(const InsertGroup&) = delete;
+ InsertGroup& operator=(const InsertGroup&) = delete;
public:
using ConstIterator = OperationPtrs::const_iterator;
diff --git a/src/mongo/db/repl/bgsync.h b/src/mongo/db/repl/bgsync.h
index 048190ee86a..7e64afae171 100644
--- a/src/mongo/db/repl/bgsync.h
+++ b/src/mongo/db/repl/bgsync.h
@@ -31,7 +31,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/repl/data_replicator_external_state.h"
@@ -62,7 +61,8 @@ class ReplicationProcess;
class StorageInterface;
class BackgroundSync {
- MONGO_DISALLOW_COPYING(BackgroundSync);
+ BackgroundSync(const BackgroundSync&) = delete;
+ BackgroundSync& operator=(const BackgroundSync&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/check_quorum_for_config_change.cpp b/src/mongo/db/repl/check_quorum_for_config_change.cpp
index e0caf330bcb..6beca6bb321 100644
--- a/src/mongo/db/repl/check_quorum_for_config_change.cpp
+++ b/src/mongo/db/repl/check_quorum_for_config_change.cpp
@@ -33,7 +33,6 @@
#include "mongo/db/repl/check_quorum_for_config_change.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/repl/repl_set_config.h"
#include "mongo/db/repl/repl_set_heartbeat_args_v1.h"
diff --git a/src/mongo/db/repl/check_quorum_for_config_change.h b/src/mongo/db/repl/check_quorum_for_config_change.h
index 1117d563d68..4a7cbcb219f 100644
--- a/src/mongo/db/repl/check_quorum_for_config_change.h
+++ b/src/mongo/db/repl/check_quorum_for_config_change.h
@@ -49,7 +49,8 @@ class ReplSetConfig;
* result of the quorum check.
*/
class QuorumChecker : public ScatterGatherAlgorithm {
- MONGO_DISALLOW_COPYING(QuorumChecker);
+ QuorumChecker(const QuorumChecker&) = delete;
+ QuorumChecker& operator=(const QuorumChecker&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/collection_bulk_loader_impl.h b/src/mongo/db/repl/collection_bulk_loader_impl.h
index 880bcc2d768..5e03fcbda5d 100644
--- a/src/mongo/db/repl/collection_bulk_loader_impl.h
+++ b/src/mongo/db/repl/collection_bulk_loader_impl.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
@@ -49,7 +48,8 @@ namespace repl {
* Note: Call commit when done inserting documents.
*/
class CollectionBulkLoaderImpl : public CollectionBulkLoader {
- MONGO_DISALLOW_COPYING(CollectionBulkLoaderImpl);
+ CollectionBulkLoaderImpl(const CollectionBulkLoaderImpl&) = delete;
+ CollectionBulkLoaderImpl& operator=(const CollectionBulkLoaderImpl&) = delete;
public:
struct Stats {
diff --git a/src/mongo/db/repl/collection_cloner.h b/src/mongo/db/repl/collection_cloner.h
index a7fbeca5922..ad14eb34f7f 100644
--- a/src/mongo/db/repl/collection_cloner.h
+++ b/src/mongo/db/repl/collection_cloner.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonobj.h"
@@ -61,7 +60,8 @@ namespace repl {
class StorageInterface;
class CollectionCloner : public BaseCloner {
- MONGO_DISALLOW_COPYING(CollectionCloner);
+ CollectionCloner(const CollectionCloner&) = delete;
+ CollectionCloner& operator=(const CollectionCloner&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/collection_cloner_test.cpp b/src/mongo/db/repl/collection_cloner_test.cpp
index a8ca6efb7c7..c8f06889825 100644
--- a/src/mongo/db/repl/collection_cloner_test.cpp
+++ b/src/mongo/db/repl/collection_cloner_test.cpp
@@ -179,7 +179,8 @@ private:
// RAII class to pause the client; since tests are very exception-heavy this prevents them
// from hanging on failure.
class MockClientPauser {
- MONGO_DISALLOW_COPYING(MockClientPauser);
+ MockClientPauser(const MockClientPauser&) = delete;
+ MockClientPauser& operator=(const MockClientPauser&) = delete;
public:
MockClientPauser(FailableMockDBClientConnection* client) : _client(client) {
@@ -1118,7 +1119,8 @@ TEST_F(CollectionClonerTest, CollectionClonerCannotBeRestartedAfterPreviousFailu
bool sharedCallbackStateDestroyed = false;
class SharedCallbackState {
- MONGO_DISALLOW_COPYING(SharedCallbackState);
+ SharedCallbackState(const SharedCallbackState&) = delete;
+ SharedCallbackState& operator=(const SharedCallbackState&) = delete;
public:
SharedCallbackState() {}
diff --git a/src/mongo/db/repl/data_replicator_external_state.h b/src/mongo/db/repl/data_replicator_external_state.h
index 0cc4feb3bad..6ce205ff898 100644
--- a/src/mongo/db/repl/data_replicator_external_state.h
+++ b/src/mongo/db/repl/data_replicator_external_state.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/repl/multiapplier.h"
#include "mongo/db/repl/oplog_applier.h"
@@ -66,7 +65,8 @@ using OpTimeWithTerm = OpTimeWith<long long>;
* InitialSyncer should be moved here.
*/
class DataReplicatorExternalState {
- MONGO_DISALLOW_COPYING(DataReplicatorExternalState);
+ DataReplicatorExternalState(const DataReplicatorExternalState&) = delete;
+ DataReplicatorExternalState& operator=(const DataReplicatorExternalState&) = delete;
public:
DataReplicatorExternalState() = default;
diff --git a/src/mongo/db/repl/data_replicator_external_state_mock.cpp b/src/mongo/db/repl/data_replicator_external_state_mock.cpp
index 2c164614fc4..96c69326412 100644
--- a/src/mongo/db/repl/data_replicator_external_state_mock.cpp
+++ b/src/mongo/db/repl/data_replicator_external_state_mock.cpp
@@ -40,7 +40,8 @@ namespace repl {
namespace {
class OplogApplierMock : public OplogApplier {
- MONGO_DISALLOW_COPYING(OplogApplierMock);
+ OplogApplierMock(const OplogApplierMock&) = delete;
+ OplogApplierMock& operator=(const OplogApplierMock&) = delete;
public:
OplogApplierMock(executor::TaskExecutor* executor,
diff --git a/src/mongo/db/repl/database_cloner.h b/src/mongo/db/repl/database_cloner.h
index f888118d1e0..94b559d8278 100644
--- a/src/mongo/db/repl/database_cloner.h
+++ b/src/mongo/db/repl/database_cloner.h
@@ -34,7 +34,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/client/fetcher.h"
@@ -53,7 +52,8 @@ namespace repl {
class StorageInterface;
class DatabaseCloner : public BaseCloner {
- MONGO_DISALLOW_COPYING(DatabaseCloner);
+ DatabaseCloner(const DatabaseCloner&) = delete;
+ DatabaseCloner& operator=(const DatabaseCloner&) = delete;
public:
struct Stats {
diff --git a/src/mongo/db/repl/databases_cloner.h b/src/mongo/db/repl/databases_cloner.h
index 179425852c5..8d94afe26fc 100644
--- a/src/mongo/db/repl/databases_cloner.h
+++ b/src/mongo/db/repl/databases_cloner.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
diff --git a/src/mongo/db/repl/databases_cloner_test.cpp b/src/mongo/db/repl/databases_cloner_test.cpp
index 02cdcd1118d..c4828eca321 100644
--- a/src/mongo/db/repl/databases_cloner_test.cpp
+++ b/src/mongo/db/repl/databases_cloner_test.cpp
@@ -630,7 +630,8 @@ TEST_F(DBsClonerTest, DatabasesClonerReturnsCallbackCanceledIfShutdownDuringList
bool sharedCallbackStateDestroyed = false;
class SharedCallbackState {
- MONGO_DISALLOW_COPYING(SharedCallbackState);
+ SharedCallbackState(const SharedCallbackState&) = delete;
+ SharedCallbackState& operator=(const SharedCallbackState&) = delete;
public:
SharedCallbackState() {}
diff --git a/src/mongo/db/repl/drop_pending_collection_reaper.h b/src/mongo/db/repl/drop_pending_collection_reaper.h
index 245ed2d4ca5..be8dd9a77d8 100644
--- a/src/mongo/db/repl/drop_pending_collection_reaper.h
+++ b/src/mongo/db/repl/drop_pending_collection_reaper.h
@@ -34,7 +34,6 @@
#include <map>
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/repl/optime.h"
#include "mongo/stdx/mutex.h"
@@ -60,7 +59,8 @@ class StorageInterface;
* dropCollectionsOlderThan() for this purpose.
*/
class DropPendingCollectionReaper {
- MONGO_DISALLOW_COPYING(DropPendingCollectionReaper);
+ DropPendingCollectionReaper(const DropPendingCollectionReaper&) = delete;
+ DropPendingCollectionReaper& operator=(const DropPendingCollectionReaper&) = delete;
public:
// Operation Context binding.
diff --git a/src/mongo/db/repl/initial_syncer.h b/src/mongo/db/repl/initial_syncer.h
index 658db40d705..31c4790feb7 100644
--- a/src/mongo/db/repl/initial_syncer.h
+++ b/src/mongo/db/repl/initial_syncer.h
@@ -139,7 +139,8 @@ struct InitialSyncerOptions {
* -- startup: Start initial sync.
*/
class InitialSyncer {
- MONGO_DISALLOW_COPYING(InitialSyncer);
+ InitialSyncer(const InitialSyncer&) = delete;
+ InitialSyncer& operator=(const InitialSyncer&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/initial_syncer_test.cpp b/src/mongo/db/repl/initial_syncer_test.cpp
index a8ed2079d4d..48b134eda45 100644
--- a/src/mongo/db/repl/initial_syncer_test.cpp
+++ b/src/mongo/db/repl/initial_syncer_test.cpp
@@ -981,7 +981,8 @@ TEST_F(InitialSyncerTest, InitialSyncerTransitionsToCompleteWhenFinishCallbackTh
}
class SharedCallbackState {
- MONGO_DISALLOW_COPYING(SharedCallbackState);
+ SharedCallbackState(const SharedCallbackState&) = delete;
+ SharedCallbackState& operator=(const SharedCallbackState&) = delete;
public:
explicit SharedCallbackState(bool* sharedCallbackStateDestroyed)
diff --git a/src/mongo/db/repl/multiapplier.h b/src/mongo/db/repl/multiapplier.h
index 5881a082e9b..87d34964c2f 100644
--- a/src/mongo/db/repl/multiapplier.h
+++ b/src/mongo/db/repl/multiapplier.h
@@ -35,7 +35,6 @@
#include <utility>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/db/jsobj.h"
@@ -53,7 +52,8 @@ namespace repl {
class OpTime;
class MultiApplier {
- MONGO_DISALLOW_COPYING(MultiApplier);
+ MultiApplier(const MultiApplier&) = delete;
+ MultiApplier& operator=(const MultiApplier&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/multiapplier_test.cpp b/src/mongo/db/repl/multiapplier_test.cpp
index 1130fb67f5c..bafa8eef774 100644
--- a/src/mongo/db/repl/multiapplier_test.cpp
+++ b/src/mongo/db/repl/multiapplier_test.cpp
@@ -265,7 +265,8 @@ TEST_F(
}
class SharedCallbackState {
- MONGO_DISALLOW_COPYING(SharedCallbackState);
+ SharedCallbackState(const SharedCallbackState&) = delete;
+ SharedCallbackState& operator=(const SharedCallbackState&) = delete;
public:
explicit SharedCallbackState(bool* sharedCallbackStateDestroyed)
diff --git a/src/mongo/db/repl/noop_writer.cpp b/src/mongo/db/repl/noop_writer.cpp
index 90b15f0f4ac..6897acab22c 100644
--- a/src/mongo/db/repl/noop_writer.cpp
+++ b/src/mongo/db/repl/noop_writer.cpp
@@ -60,7 +60,8 @@ const auto kMsgObj = BSON("msg"
* Runs the noopWrite argument with waitTime period until its destroyed.
*/
class NoopWriter::PeriodicNoopRunner {
- MONGO_DISALLOW_COPYING(PeriodicNoopRunner);
+ PeriodicNoopRunner(const PeriodicNoopRunner&) = delete;
+ PeriodicNoopRunner& operator=(const PeriodicNoopRunner&) = delete;
using NoopWriteFn = stdx::function<void(OperationContext*)>;
diff --git a/src/mongo/db/repl/noop_writer.h b/src/mongo/db/repl/noop_writer.h
index 1fb713c249d..07f664668d0 100644
--- a/src/mongo/db/repl/noop_writer.h
+++ b/src/mongo/db/repl/noop_writer.h
@@ -43,7 +43,8 @@ namespace repl {
* coordinator's optime has not changed since the last time it did a write.
*/
class NoopWriter {
- MONGO_DISALLOW_COPYING(NoopWriter);
+ NoopWriter(const NoopWriter&) = delete;
+ NoopWriter& operator=(const NoopWriter&) = delete;
public:
NoopWriter(Seconds waitTime);
diff --git a/src/mongo/db/repl/oplog.cpp b/src/mongo/db/repl/oplog.cpp
index b5a18749096..0aa23a1a07c 100644
--- a/src/mongo/db/repl/oplog.cpp
+++ b/src/mongo/db/repl/oplog.cpp
@@ -122,7 +122,8 @@ MONGO_FAIL_POINT_DEFINE(hangBeforeLogOpAdvancesLastApplied);
* This structure contains per-service-context state related to the oplog.
*/
struct LocalOplogInfo {
- MONGO_DISALLOW_COPYING(LocalOplogInfo);
+ LocalOplogInfo(const LocalOplogInfo&) = delete;
+ LocalOplogInfo& operator=(const LocalOplogInfo&) = delete;
LocalOplogInfo() = default;
// Name of the oplog collection.
diff --git a/src/mongo/db/repl/oplog_applier.h b/src/mongo/db/repl/oplog_applier.h
index d613ee0b7d2..9ee0f3d0b28 100644
--- a/src/mongo/db/repl/oplog_applier.h
+++ b/src/mongo/db/repl/oplog_applier.h
@@ -33,7 +33,6 @@
#include <boost/optional.hpp>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/db/repl/oplog_buffer.h"
@@ -52,7 +51,8 @@ namespace repl {
* Reads from an OplogBuffer batches of operations that may be applied in parallel.
*/
class OplogApplier {
- MONGO_DISALLOW_COPYING(OplogApplier);
+ OplogApplier(const OplogApplier&) = delete;
+ OplogApplier& operator=(const OplogApplier&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/oplog_applier_impl.h b/src/mongo/db/repl/oplog_applier_impl.h
index 0cb99b32c05..d6e0e523220 100644
--- a/src/mongo/db/repl/oplog_applier_impl.h
+++ b/src/mongo/db/repl/oplog_applier_impl.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/oplog_applier.h"
#include "mongo/db/repl/replication_consistency_markers.h"
#include "mongo/db/repl/replication_coordinator.h"
@@ -45,7 +44,8 @@ namespace repl {
* Reads from an OplogBuffer batches of operations that may be applied in parallel.
*/
class OplogApplierImpl : public OplogApplier {
- MONGO_DISALLOW_COPYING(OplogApplierImpl);
+ OplogApplierImpl(const OplogApplierImpl&) = delete;
+ OplogApplierImpl& operator=(const OplogApplierImpl&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/oplog_buffer.h b/src/mongo/db/repl/oplog_buffer.h
index 7a35778a479..fe6007dc085 100644
--- a/src/mongo/db/repl/oplog_buffer.h
+++ b/src/mongo/db/repl/oplog_buffer.h
@@ -34,7 +34,6 @@
#include <vector>
#include "mongo/base/counter.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/util/time_support.h"
@@ -51,7 +50,8 @@ namespace repl {
* Implementations are only required to support one pusher and one popper.
*/
class OplogBuffer {
- MONGO_DISALLOW_COPYING(OplogBuffer);
+ OplogBuffer(const OplogBuffer&) = delete;
+ OplogBuffer& operator=(const OplogBuffer&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/oplog_buffer_proxy.h b/src/mongo/db/repl/oplog_buffer_proxy.h
index 440d8616142..544b5b6739f 100644
--- a/src/mongo/db/repl/oplog_buffer_proxy.h
+++ b/src/mongo/db/repl/oplog_buffer_proxy.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/oplog_buffer.h"
#include "mongo/stdx/mutex.h"
@@ -46,7 +45,8 @@ class StorageInterface;
* oplog buffer.
*/
class OplogBufferProxy : public OplogBuffer {
- MONGO_DISALLOW_COPYING(OplogBufferProxy);
+ OplogBufferProxy(const OplogBufferProxy&) = delete;
+ OplogBufferProxy& operator=(const OplogBufferProxy&) = delete;
public:
explicit OplogBufferProxy(std::unique_ptr<OplogBuffer> target);
diff --git a/src/mongo/db/repl/oplog_buffer_proxy_test.cpp b/src/mongo/db/repl/oplog_buffer_proxy_test.cpp
index 95cc39b3b65..33173a8b75a 100644
--- a/src/mongo/db/repl/oplog_buffer_proxy_test.cpp
+++ b/src/mongo/db/repl/oplog_buffer_proxy_test.cpp
@@ -32,7 +32,6 @@
#include <boost/optional/optional_io.hpp>
#include <deque>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/repl/oplog_buffer_proxy.h"
#include "mongo/stdx/functional.h"
@@ -46,7 +45,8 @@ using namespace mongo;
using namespace mongo::repl;
class OplogBufferMock : public OplogBuffer {
- MONGO_DISALLOW_COPYING(OplogBufferMock);
+ OplogBufferMock(const OplogBufferMock&) = delete;
+ OplogBufferMock& operator=(const OplogBufferMock&) = delete;
public:
OplogBufferMock() = default;
diff --git a/src/mongo/db/repl/oplog_fetcher.h b/src/mongo/db/repl/oplog_fetcher.h
index cfc11787df5..c42f4a884c0 100644
--- a/src/mongo/db/repl/oplog_fetcher.h
+++ b/src/mongo/db/repl/oplog_fetcher.h
@@ -31,7 +31,6 @@
#include <cstddef>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/timestamp.h"
#include "mongo/client/fetcher.h"
@@ -72,7 +71,8 @@ MONGO_FAIL_POINT_DECLARE(stopReplProducer);
* `getMore` commands, and handles restarting on errors.
*/
class OplogFetcher : public AbstractOplogFetcher {
- MONGO_DISALLOW_COPYING(OplogFetcher);
+ OplogFetcher(const OplogFetcher&) = delete;
+ OplogFetcher& operator=(const OplogFetcher&) = delete;
public:
static Seconds kDefaultProtocolZeroAwaitDataTimeout;
diff --git a/src/mongo/db/repl/oplog_interface.h b/src/mongo/db/repl/oplog_interface.h
index 04cfb40f532..710e1b6de6b 100644
--- a/src/mongo/db/repl/oplog_interface.h
+++ b/src/mongo/db/repl/oplog_interface.h
@@ -33,7 +33,6 @@
#include <string>
#include <utility>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/record_id.h"
@@ -43,7 +42,8 @@ namespace mongo {
namespace repl {
class OplogInterface {
- MONGO_DISALLOW_COPYING(OplogInterface);
+ OplogInterface(const OplogInterface&) = delete;
+ OplogInterface& operator=(const OplogInterface&) = delete;
public:
class Iterator;
@@ -70,7 +70,8 @@ protected:
};
class OplogInterface::Iterator {
- MONGO_DISALLOW_COPYING(Iterator);
+ Iterator(const Iterator&) = delete;
+ Iterator& operator=(const Iterator&) = delete;
public:
using Value = std::pair<BSONObj, RecordId>;
diff --git a/src/mongo/db/repl/oplog_interface_mock.h b/src/mongo/db/repl/oplog_interface_mock.h
index 813fda41605..678a0b28c8c 100644
--- a/src/mongo/db/repl/oplog_interface_mock.h
+++ b/src/mongo/db/repl/oplog_interface_mock.h
@@ -39,7 +39,8 @@ namespace repl {
* Simulates oplog for testing rollback functionality.
*/
class OplogInterfaceMock : public OplogInterface {
- MONGO_DISALLOW_COPYING(OplogInterfaceMock);
+ OplogInterfaceMock(const OplogInterfaceMock&) = delete;
+ OplogInterfaceMock& operator=(const OplogInterfaceMock&) = delete;
public:
using Operation = std::pair<BSONObj, RecordId>;
diff --git a/src/mongo/db/repl/replication_consistency_markers.h b/src/mongo/db/repl/replication_consistency_markers.h
index 82118277986..894aec89f66 100644
--- a/src/mongo/db/repl/replication_consistency_markers.h
+++ b/src/mongo/db/repl/replication_consistency_markers.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/namespace_string.h"
namespace mongo {
@@ -75,7 +74,8 @@ class StorageInterface;
* See below for explanations of each field.
*/
class ReplicationConsistencyMarkers {
- MONGO_DISALLOW_COPYING(ReplicationConsistencyMarkers);
+ ReplicationConsistencyMarkers(const ReplicationConsistencyMarkers&) = delete;
+ ReplicationConsistencyMarkers& operator=(const ReplicationConsistencyMarkers&) = delete;
public:
// Constructor and Destructor.
diff --git a/src/mongo/db/repl/replication_consistency_markers_impl.h b/src/mongo/db/repl/replication_consistency_markers_impl.h
index 5e64762d490..cb3b8ecf6cc 100644
--- a/src/mongo/db/repl/replication_consistency_markers_impl.h
+++ b/src/mongo/db/repl/replication_consistency_markers_impl.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/repl/replication_consistency_markers.h"
#include "mongo/db/repl/replication_consistency_markers_gen.h"
@@ -47,7 +46,8 @@ class StorageInterface;
struct TimestampedBSONObj;
class ReplicationConsistencyMarkersImpl : public ReplicationConsistencyMarkers {
- MONGO_DISALLOW_COPYING(ReplicationConsistencyMarkersImpl);
+ ReplicationConsistencyMarkersImpl(const ReplicationConsistencyMarkersImpl&) = delete;
+ ReplicationConsistencyMarkersImpl& operator=(const ReplicationConsistencyMarkersImpl&) = delete;
public:
static constexpr StringData kDefaultMinValidNamespace = "local.replset.minvalid"_sd;
diff --git a/src/mongo/db/repl/replication_consistency_markers_mock.h b/src/mongo/db/repl/replication_consistency_markers_mock.h
index 165c6185c43..3215264110f 100644
--- a/src/mongo/db/repl/replication_consistency_markers_mock.h
+++ b/src/mongo/db/repl/replication_consistency_markers_mock.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/replication_consistency_markers.h"
#include "mongo/stdx/mutex.h"
@@ -46,7 +45,8 @@ namespace repl {
* A mock ReplicationConsistencyMarkers implementation that stores everything in memory.
*/
class ReplicationConsistencyMarkersMock : public ReplicationConsistencyMarkers {
- MONGO_DISALLOW_COPYING(ReplicationConsistencyMarkersMock);
+ ReplicationConsistencyMarkersMock(const ReplicationConsistencyMarkersMock&) = delete;
+ ReplicationConsistencyMarkersMock& operator=(const ReplicationConsistencyMarkersMock&) = delete;
public:
ReplicationConsistencyMarkersMock() = default;
diff --git a/src/mongo/db/repl/replication_coordinator.h b/src/mongo/db/repl/replication_coordinator.h
index 6b63d156b17..7efc12c9994 100644
--- a/src/mongo/db/repl/replication_coordinator.h
+++ b/src/mongo/db/repl/replication_coordinator.h
@@ -31,7 +31,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/timestamp.h"
@@ -85,7 +84,8 @@ class UpdatePositionArgs;
* API that the replication subsystem presents to the rest of the codebase.
*/
class ReplicationCoordinator : public SyncSourceSelector {
- MONGO_DISALLOW_COPYING(ReplicationCoordinator);
+ ReplicationCoordinator(const ReplicationCoordinator&) = delete;
+ ReplicationCoordinator& operator=(const ReplicationCoordinator&) = delete;
public:
static ReplicationCoordinator* get(ServiceContext* service);
diff --git a/src/mongo/db/repl/replication_coordinator_external_state.h b/src/mongo/db/repl/replication_coordinator_external_state.h
index a7bb4c6bdd0..aa81dc2b6cf 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state.h
+++ b/src/mongo/db/repl/replication_coordinator_external_state.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <cstddef>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/repl/member_state.h"
#include "mongo/db/repl/optime.h"
@@ -65,7 +64,9 @@ class ReplicationCoordinator;
* ReplicationCoordinatorImpl should be moved here.
*/
class ReplicationCoordinatorExternalState {
- MONGO_DISALLOW_COPYING(ReplicationCoordinatorExternalState);
+ ReplicationCoordinatorExternalState(const ReplicationCoordinatorExternalState&) = delete;
+ ReplicationCoordinatorExternalState& operator=(const ReplicationCoordinatorExternalState&) =
+ delete;
public:
ReplicationCoordinatorExternalState() {}
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_impl.h b/src/mongo/db/repl/replication_coordinator_external_state_impl.h
index fb6ea07d80f..0cdef723c00 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_impl.h
+++ b/src/mongo/db/repl/replication_coordinator_external_state_impl.h
@@ -31,7 +31,6 @@
#include <deque>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/repl/bgsync.h"
#include "mongo/db/repl/oplog_applier.h"
@@ -58,7 +57,10 @@ class NoopWriter;
class ReplicationCoordinatorExternalStateImpl final : public ReplicationCoordinatorExternalState,
public JournalListener {
- MONGO_DISALLOW_COPYING(ReplicationCoordinatorExternalStateImpl);
+ ReplicationCoordinatorExternalStateImpl(const ReplicationCoordinatorExternalStateImpl&) =
+ delete;
+ ReplicationCoordinatorExternalStateImpl& operator=(
+ const ReplicationCoordinatorExternalStateImpl&) = delete;
public:
ReplicationCoordinatorExternalStateImpl(
diff --git a/src/mongo/db/repl/replication_coordinator_external_state_mock.h b/src/mongo/db/repl/replication_coordinator_external_state_mock.h
index 6311dd446b1..eeda5419db9 100644
--- a/src/mongo/db/repl/replication_coordinator_external_state_mock.h
+++ b/src/mongo/db/repl/replication_coordinator_external_state_mock.h
@@ -31,7 +31,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/oid.h"
#include "mongo/bson/timestamp.h"
@@ -50,7 +49,10 @@ class ServiceContext;
namespace repl {
class ReplicationCoordinatorExternalStateMock : public ReplicationCoordinatorExternalState {
- MONGO_DISALLOW_COPYING(ReplicationCoordinatorExternalStateMock);
+ ReplicationCoordinatorExternalStateMock(const ReplicationCoordinatorExternalStateMock&) =
+ delete;
+ ReplicationCoordinatorExternalStateMock& operator=(
+ const ReplicationCoordinatorExternalStateMock&) = delete;
public:
class GlobalSharedLockAcquirer;
diff --git a/src/mongo/db/repl/replication_coordinator_impl.cpp b/src/mongo/db/repl/replication_coordinator_impl.cpp
index c0a6e03c39e..674e244acd8 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl.cpp
@@ -129,7 +129,8 @@ const OperationContext::Decoration<bool> alwaysAllowNonLocalWrites =
* Resets to original value when leaving scope so it is safe to nest.
*/
class AllowNonLocalWritesBlock {
- MONGO_DISALLOW_COPYING(AllowNonLocalWritesBlock);
+ AllowNonLocalWritesBlock(const AllowNonLocalWritesBlock&) = delete;
+ AllowNonLocalWritesBlock& operator=(const AllowNonLocalWritesBlock&) = delete;
public:
AllowNonLocalWritesBlock(OperationContext* opCtx)
diff --git a/src/mongo/db/repl/replication_coordinator_impl.h b/src/mongo/db/repl/replication_coordinator_impl.h
index 195e11d799b..52a862292c3 100644
--- a/src/mongo/db/repl/replication_coordinator_impl.h
+++ b/src/mongo/db/repl/replication_coordinator_impl.h
@@ -82,7 +82,8 @@ class TopologyCoordinator;
class VoteRequester;
class ReplicationCoordinatorImpl : public ReplicationCoordinator {
- MONGO_DISALLOW_COPYING(ReplicationCoordinatorImpl);
+ ReplicationCoordinatorImpl(const ReplicationCoordinatorImpl&) = delete;
+ ReplicationCoordinatorImpl& operator=(const ReplicationCoordinatorImpl&) = delete;
public:
ReplicationCoordinatorImpl(ServiceContext* serviceContext,
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 73fee3bf73e..e8415946dfc 100644
--- a/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp
+++ b/src/mongo/db/repl/replication_coordinator_impl_elect_v1.cpp
@@ -33,7 +33,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/replication_coordinator_impl.h"
#include "mongo/db/repl/topology_coordinator.h"
#include "mongo/db/repl/vote_requester.h"
@@ -45,7 +44,8 @@ namespace mongo {
namespace repl {
class ReplicationCoordinatorImpl::LoseElectionGuardV1 {
- MONGO_DISALLOW_COPYING(LoseElectionGuardV1);
+ LoseElectionGuardV1(const LoseElectionGuardV1&) = delete;
+ LoseElectionGuardV1& operator=(const LoseElectionGuardV1&) = delete;
public:
LoseElectionGuardV1(ReplicationCoordinatorImpl* replCoord) : _replCoord(replCoord) {}
@@ -76,7 +76,8 @@ protected:
};
class ReplicationCoordinatorImpl::LoseElectionDryRunGuardV1 : public LoseElectionGuardV1 {
- MONGO_DISALLOW_COPYING(LoseElectionDryRunGuardV1);
+ LoseElectionDryRunGuardV1(const LoseElectionDryRunGuardV1&) = delete;
+ LoseElectionDryRunGuardV1& operator=(const LoseElectionDryRunGuardV1&) = delete;
public:
LoseElectionDryRunGuardV1(ReplicationCoordinatorImpl* replCoord)
diff --git a/src/mongo/db/repl/replication_coordinator_mock.h b/src/mongo/db/repl/replication_coordinator_mock.h
index 1fc093a635b..23c1c4080ac 100644
--- a/src/mongo/db/repl/replication_coordinator_mock.h
+++ b/src/mongo/db/repl/replication_coordinator_mock.h
@@ -50,7 +50,8 @@ namespace repl {
* into dbtests.
*/
class ReplicationCoordinatorMock : public ReplicationCoordinator {
- MONGO_DISALLOW_COPYING(ReplicationCoordinatorMock);
+ ReplicationCoordinatorMock(const ReplicationCoordinatorMock&) = delete;
+ ReplicationCoordinatorMock& operator=(const ReplicationCoordinatorMock&) = delete;
public:
ReplicationCoordinatorMock(ServiceContext* service, const ReplSettings& settings);
diff --git a/src/mongo/db/repl/replication_process.h b/src/mongo/db/repl/replication_process.h
index aae288504c6..849ac7df8c4 100644
--- a/src/mongo/db/repl/replication_process.h
+++ b/src/mongo/db/repl/replication_process.h
@@ -32,7 +32,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/db/namespace_string.h"
@@ -60,7 +59,8 @@ class StorageInterface;
* This class DOES NOT hold any information related to the consensus protocol.
*/
class ReplicationProcess {
- MONGO_DISALLOW_COPYING(ReplicationProcess);
+ ReplicationProcess(const ReplicationProcess&) = delete;
+ ReplicationProcess& operator=(const ReplicationProcess&) = delete;
public:
static const int kUninitializedRollbackId = -1;
diff --git a/src/mongo/db/repl/replication_recovery.h b/src/mongo/db/repl/replication_recovery.h
index 68a86833fcd..a33cb15e51c 100644
--- a/src/mongo/db/repl/replication_recovery.h
+++ b/src/mongo/db/repl/replication_recovery.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/repl/optime.h"
@@ -59,7 +58,8 @@ public:
};
class ReplicationRecoveryImpl : public ReplicationRecovery {
- MONGO_DISALLOW_COPYING(ReplicationRecoveryImpl);
+ ReplicationRecoveryImpl(const ReplicationRecoveryImpl&) = delete;
+ ReplicationRecoveryImpl& operator=(const ReplicationRecoveryImpl&) = delete;
public:
ReplicationRecoveryImpl(StorageInterface* storageInterface,
diff --git a/src/mongo/db/repl/replication_recovery_mock.h b/src/mongo/db/repl/replication_recovery_mock.h
index a908c84de84..77835215ca3 100644
--- a/src/mongo/db/repl/replication_recovery_mock.h
+++ b/src/mongo/db/repl/replication_recovery_mock.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/replication_recovery.h"
namespace mongo {
@@ -37,7 +36,8 @@ class OperationContext;
namespace repl {
class ReplicationRecoveryMock : public ReplicationRecovery {
- MONGO_DISALLOW_COPYING(ReplicationRecoveryMock);
+ ReplicationRecoveryMock(const ReplicationRecoveryMock&) = delete;
+ ReplicationRecoveryMock& operator=(const ReplicationRecoveryMock&) = delete;
public:
ReplicationRecoveryMock() = default;
diff --git a/src/mongo/db/repl/reporter.h b/src/mongo/db/repl/reporter.h
index 8a10c2a1a02..f332401ea2e 100644
--- a/src/mongo/db/repl/reporter.h
+++ b/src/mongo/db/repl/reporter.h
@@ -63,7 +63,8 @@ namespace repl {
* keep alive timeout, resetting the keep alive schedule.
*/
class Reporter {
- MONGO_DISALLOW_COPYING(Reporter);
+ Reporter(const Reporter&) = delete;
+ Reporter& operator=(const Reporter&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/roll_back_local_operations.h b/src/mongo/db/repl/roll_back_local_operations.h
index c1c44578ef2..7d21b2feb74 100644
--- a/src/mongo/db/repl/roll_back_local_operations.h
+++ b/src/mongo/db/repl/roll_back_local_operations.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
@@ -52,7 +51,8 @@ MONGO_FAIL_POINT_DECLARE(rollbackHangBeforeFinish);
MONGO_FAIL_POINT_DECLARE(rollbackHangThenFailAfterWritingMinValid);
class RollBackLocalOperations {
- MONGO_DISALLOW_COPYING(RollBackLocalOperations);
+ RollBackLocalOperations(const RollBackLocalOperations&) = delete;
+ RollBackLocalOperations& operator=(const RollBackLocalOperations&) = delete;
public:
class RollbackCommonPoint {
diff --git a/src/mongo/db/repl/rollback.h b/src/mongo/db/repl/rollback.h
index d7ca747afa3..26af57b79e9 100644
--- a/src/mongo/db/repl/rollback.h
+++ b/src/mongo/db/repl/rollback.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/repl/optime.h"
#include "mongo/stdx/functional.h"
@@ -42,7 +41,8 @@ namespace repl {
* interact with the rollback subsystem.
*/
class Rollback {
- MONGO_DISALLOW_COPYING(Rollback);
+ Rollback(const Rollback&) = delete;
+ Rollback& operator=(const Rollback&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/rollback_checker.h b/src/mongo/db/repl/rollback_checker.h
index c1f3d2fda00..ed589e57c7c 100644
--- a/src/mongo/db/repl/rollback_checker.h
+++ b/src/mongo/db/repl/rollback_checker.h
@@ -60,7 +60,8 @@ class Mutex;
*
*/
class RollbackChecker {
- MONGO_DISALLOW_COPYING(RollbackChecker);
+ RollbackChecker(const RollbackChecker&) = delete;
+ RollbackChecker& operator=(const RollbackChecker&) = delete;
public:
// Rollback checker result - true if rollback occurred; false if rollback IDs
diff --git a/src/mongo/db/repl/rollback_source.h b/src/mongo/db/repl/rollback_source.h
index e86473e7aef..5d58240b820 100644
--- a/src/mongo/db/repl/rollback_source.h
+++ b/src/mongo/db/repl/rollback_source.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/jsobj.h"
#include "mongo/util/net/hostandport.h"
@@ -48,7 +47,8 @@ class OplogInterface;
* Interface for rollback-related operations on the sync source.
*/
class RollbackSource {
- MONGO_DISALLOW_COPYING(RollbackSource);
+ RollbackSource(const RollbackSource&) = delete;
+ RollbackSource& operator=(const RollbackSource&) = delete;
public:
RollbackSource() = default;
diff --git a/src/mongo/db/repl/scatter_gather_runner.h b/src/mongo/db/repl/scatter_gather_runner.h
index 5fe7f08b894..4d65e417efb 100644
--- a/src/mongo/db/repl/scatter_gather_runner.h
+++ b/src/mongo/db/repl/scatter_gather_runner.h
@@ -31,7 +31,6 @@
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/executor/task_executor.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/mutex.h"
@@ -49,7 +48,8 @@ class ScatterGatherAlgorithm;
* Interface of a scatter-gather behavior.
*/
class ScatterGatherRunner {
- MONGO_DISALLOW_COPYING(ScatterGatherRunner);
+ ScatterGatherRunner(const ScatterGatherRunner&) = delete;
+ ScatterGatherRunner& operator=(const ScatterGatherRunner&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/storage_interface.h b/src/mongo/db/repl/storage_interface.h
index 6339d31f475..9ea9ee02929 100644
--- a/src/mongo/db/repl/storage_interface.h
+++ b/src/mongo/db/repl/storage_interface.h
@@ -35,7 +35,6 @@
#include <iosfwd>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/catalog/collection.h"
@@ -71,7 +70,8 @@ struct TimestampedBSONObj {
* * Insert documents into a collection
*/
class StorageInterface {
- MONGO_DISALLOW_COPYING(StorageInterface);
+ StorageInterface(const StorageInterface&) = delete;
+ StorageInterface& operator=(const StorageInterface&) = delete;
public:
// Operation Context binding.
diff --git a/src/mongo/db/repl/storage_interface_impl.h b/src/mongo/db/repl/storage_interface_impl.h
index a62587f9a6c..24538fed00f 100644
--- a/src/mongo/db/repl/storage_interface_impl.h
+++ b/src/mongo/db/repl/storage_interface_impl.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/base/string_data.h"
@@ -43,7 +42,8 @@ namespace mongo {
namespace repl {
class StorageInterfaceImpl : public StorageInterface {
- MONGO_DISALLOW_COPYING(StorageInterfaceImpl);
+ StorageInterfaceImpl(const StorageInterfaceImpl&) = delete;
+ StorageInterfaceImpl& operator=(const StorageInterfaceImpl&) = delete;
public:
static const char kDefaultRollbackIdNamespace[];
diff --git a/src/mongo/db/repl/storage_interface_mock.h b/src/mongo/db/repl/storage_interface_mock.h
index 2dca3362dde..fd1084ccfe9 100644
--- a/src/mongo/db/repl/storage_interface_mock.h
+++ b/src/mongo/db/repl/storage_interface_mock.h
@@ -36,7 +36,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/base/string_data.h"
@@ -56,7 +55,8 @@ struct CollectionMockStats {
};
class CollectionBulkLoaderMock : public CollectionBulkLoader {
- MONGO_DISALLOW_COPYING(CollectionBulkLoaderMock);
+ CollectionBulkLoaderMock(const CollectionBulkLoaderMock&) = delete;
+ CollectionBulkLoaderMock& operator=(const CollectionBulkLoaderMock&) = delete;
public:
explicit CollectionBulkLoaderMock(std::shared_ptr<CollectionMockStats> collStats)
@@ -87,7 +87,8 @@ public:
};
class StorageInterfaceMock : public StorageInterface {
- MONGO_DISALLOW_COPYING(StorageInterfaceMock);
+ StorageInterfaceMock(const StorageInterfaceMock&) = delete;
+ StorageInterfaceMock& operator=(const StorageInterfaceMock&) = delete;
public:
// Used for testing.
diff --git a/src/mongo/db/repl/sync_source_feedback.h b/src/mongo/db/repl/sync_source_feedback.h
index 855e10f6523..a75cb23ad64 100644
--- a/src/mongo/db/repl/sync_source_feedback.h
+++ b/src/mongo/db/repl/sync_source_feedback.h
@@ -30,7 +30,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/repl/replication_coordinator.h"
#include "mongo/stdx/condition_variable.h"
@@ -49,7 +48,8 @@ class BackgroundSync;
class Reporter;
class SyncSourceFeedback {
- MONGO_DISALLOW_COPYING(SyncSourceFeedback);
+ SyncSourceFeedback(const SyncSourceFeedback&) = delete;
+ SyncSourceFeedback& operator=(const SyncSourceFeedback&) = delete;
public:
SyncSourceFeedback() = default;
diff --git a/src/mongo/db/repl/sync_source_selector.h b/src/mongo/db/repl/sync_source_selector.h
index 393837727bf..0a620d691a2 100644
--- a/src/mongo/db/repl/sync_source_selector.h
+++ b/src/mongo/db/repl/sync_source_selector.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/rpc/metadata/oplog_query_metadata.h"
#include "mongo/util/net/hostandport.h"
#include "mongo/util/time_support.h"
@@ -53,7 +52,8 @@ struct SyncSourceResolverResponse;
* Manage list of viable and blocked sync sources that we can replicate from.
*/
class SyncSourceSelector {
- MONGO_DISALLOW_COPYING(SyncSourceSelector);
+ SyncSourceSelector(const SyncSourceSelector&) = delete;
+ SyncSourceSelector& operator=(const SyncSourceSelector&) = delete;
public:
SyncSourceSelector() = default;
diff --git a/src/mongo/db/repl/sync_source_selector_mock.h b/src/mongo/db/repl/sync_source_selector_mock.h
index a9837bc6f0d..cbf8df0fe9f 100644
--- a/src/mongo/db/repl/sync_source_selector_mock.h
+++ b/src/mongo/db/repl/sync_source_selector_mock.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/sync_source_selector.h"
#include "mongo/stdx/functional.h"
@@ -41,7 +40,8 @@ namespace repl {
* Mock implementation of SyncSourceSelector interface for testing.
*/
class SyncSourceSelectorMock : public SyncSourceSelector {
- MONGO_DISALLOW_COPYING(SyncSourceSelectorMock);
+ SyncSourceSelectorMock(const SyncSourceSelectorMock&) = delete;
+ SyncSourceSelectorMock& operator=(const SyncSourceSelectorMock&) = delete;
public:
using ChooseNewSyncSourceHook = stdx::function<void()>;
diff --git a/src/mongo/db/repl/sync_tail.cpp b/src/mongo/db/repl/sync_tail.cpp
index 5870c6e57e9..399bede7329 100644
--- a/src/mongo/db/repl/sync_tail.cpp
+++ b/src/mongo/db/repl/sync_tail.cpp
@@ -570,7 +570,8 @@ void tryToGoLiveAsASecondary(OperationContext* opCtx,
} // namespace
class SyncTail::OpQueueBatcher {
- MONGO_DISALLOW_COPYING(OpQueueBatcher);
+ OpQueueBatcher(const OpQueueBatcher&) = delete;
+ OpQueueBatcher& operator=(const OpQueueBatcher&) = delete;
public:
OpQueueBatcher(SyncTail* syncTail, StorageInterface* storageInterface, OplogBuffer* oplogBuffer)
diff --git a/src/mongo/db/repl/task_runner.h b/src/mongo/db/repl/task_runner.h
index 19af9e8fbf8..a63a428177f 100644
--- a/src/mongo/db/repl/task_runner.h
+++ b/src/mongo/db/repl/task_runner.h
@@ -31,7 +31,6 @@
#include <list>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/service_context.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/functional.h"
@@ -47,7 +46,8 @@ class OperationContext;
namespace repl {
class TaskRunner {
- MONGO_DISALLOW_COPYING(TaskRunner);
+ TaskRunner(const TaskRunner&) = delete;
+ TaskRunner& operator=(const TaskRunner&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/timestamp_block.h b/src/mongo/db/repl/timestamp_block.h
index 1f512128d93..4d47ec3146a 100644
--- a/src/mongo/db/repl/timestamp_block.h
+++ b/src/mongo/db/repl/timestamp_block.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/operation_context.h"
@@ -41,7 +40,8 @@ namespace mongo {
* TimestampBlock is in scope.
*/
class TimestampBlock {
- MONGO_DISALLOW_COPYING(TimestampBlock);
+ TimestampBlock(const TimestampBlock&) = delete;
+ TimestampBlock& operator=(const TimestampBlock&) = delete;
public:
TimestampBlock(OperationContext* opCtx, Timestamp ts);
diff --git a/src/mongo/db/repl/topology_coordinator.h b/src/mongo/db/repl/topology_coordinator.h
index d84adb67f43..9b89cd0bce7 100644
--- a/src/mongo/db/repl/topology_coordinator.h
+++ b/src/mongo/db/repl/topology_coordinator.h
@@ -32,7 +32,6 @@
#include <iosfwd>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/repl/last_vote.h"
#include "mongo/db/repl/repl_set_heartbeat_response.h"
#include "mongo/db/repl/replication_coordinator.h"
@@ -65,7 +64,8 @@ const int kMaxHeartbeatRetries = 2;
* Methods of this class should be non-blocking.
*/
class TopologyCoordinator {
- MONGO_DISALLOW_COPYING(TopologyCoordinator);
+ TopologyCoordinator(const TopologyCoordinator&) = delete;
+ TopologyCoordinator& operator=(const TopologyCoordinator&) = delete;
public:
/**
diff --git a/src/mongo/db/repl/vote_requester.h b/src/mongo/db/repl/vote_requester.h
index 396080834e2..c411065a988 100644
--- a/src/mongo/db/repl/vote_requester.h
+++ b/src/mongo/db/repl/vote_requester.h
@@ -32,7 +32,6 @@
#include <memory>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/repl/optime.h"
#include "mongo/db/repl/repl_set_config.h"
@@ -49,7 +48,8 @@ class Status;
namespace repl {
class VoteRequester {
- MONGO_DISALLOW_COPYING(VoteRequester);
+ VoteRequester(const VoteRequester&) = delete;
+ VoteRequester& operator=(const VoteRequester&) = delete;
public:
enum class Result { kSuccessfullyElected, kStaleTerm, kInsufficientVotes, kPrimaryRespondedNo };
diff --git a/src/mongo/db/retryable_writes_stats.h b/src/mongo/db/retryable_writes_stats.h
index 6f7068d5087..f2ba00e5e23 100644
--- a/src/mongo/db/retryable_writes_stats.h
+++ b/src/mongo/db/retryable_writes_stats.h
@@ -40,7 +40,8 @@ namespace mongo {
* Container for retryable writes statistics.
*/
class RetryableWritesStats {
- MONGO_DISALLOW_COPYING(RetryableWritesStats);
+ RetryableWritesStats(const RetryableWritesStats&) = delete;
+ RetryableWritesStats& operator=(const RetryableWritesStats&) = delete;
public:
RetryableWritesStats() = default;
diff --git a/src/mongo/db/s/active_migrations_registry.h b/src/mongo/db/s/active_migrations_registry.h
index 6c62ab2b30d..d2e3f4b2ad0 100644
--- a/src/mongo/db/s/active_migrations_registry.h
+++ b/src/mongo/db/s/active_migrations_registry.h
@@ -31,7 +31,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/migration_session_id.h"
#include "mongo/s/request_types/move_chunk_request.h"
#include "mongo/stdx/memory.h"
@@ -51,7 +50,8 @@ class StatusWith;
* to only one per shard. There is only one instance of this object per shard.
*/
class ActiveMigrationsRegistry {
- MONGO_DISALLOW_COPYING(ActiveMigrationsRegistry);
+ ActiveMigrationsRegistry(const ActiveMigrationsRegistry&) = delete;
+ ActiveMigrationsRegistry& operator=(const ActiveMigrationsRegistry&) = delete;
public:
ActiveMigrationsRegistry();
@@ -167,7 +167,8 @@ private:
* registerDonateChunk method for more details.
*/
class ScopedDonateChunk {
- MONGO_DISALLOW_COPYING(ScopedDonateChunk);
+ ScopedDonateChunk(const ScopedDonateChunk&) = delete;
+ ScopedDonateChunk& operator=(const ScopedDonateChunk&) = delete;
public:
ScopedDonateChunk(ActiveMigrationsRegistry* registry,
@@ -220,7 +221,8 @@ private:
* registry.
*/
class ScopedReceiveChunk {
- MONGO_DISALLOW_COPYING(ScopedReceiveChunk);
+ ScopedReceiveChunk(const ScopedReceiveChunk&) = delete;
+ ScopedReceiveChunk& operator=(const ScopedReceiveChunk&) = delete;
public:
ScopedReceiveChunk(ActiveMigrationsRegistry* registry);
diff --git a/src/mongo/db/s/active_move_primaries_registry.h b/src/mongo/db/s/active_move_primaries_registry.h
index 544300ec347..8ddd051478e 100644
--- a/src/mongo/db/s/active_move_primaries_registry.h
+++ b/src/mongo/db/s/active_move_primaries_registry.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/s/request_types/move_primary_gen.h"
#include "mongo/util/concurrency/notification.h"
@@ -43,7 +42,8 @@ class ScopedMovePrimary;
*/
class ActiveMovePrimariesRegistry {
- MONGO_DISALLOW_COPYING(ActiveMovePrimariesRegistry);
+ ActiveMovePrimariesRegistry(const ActiveMovePrimariesRegistry&) = delete;
+ ActiveMovePrimariesRegistry& operator=(const ActiveMovePrimariesRegistry&) = delete;
public:
ActiveMovePrimariesRegistry();
@@ -112,7 +112,8 @@ private:
* registerMovePrimary for more details.
*/
class ScopedMovePrimary {
- MONGO_DISALLOW_COPYING(ScopedMovePrimary);
+ ScopedMovePrimary(const ScopedMovePrimary&) = delete;
+ ScopedMovePrimary& operator=(const ScopedMovePrimary&) = delete;
public:
ScopedMovePrimary(ActiveMovePrimariesRegistry* registry,
diff --git a/src/mongo/db/s/active_shard_collection_registry.h b/src/mongo/db/s/active_shard_collection_registry.h
index 5da43ed446b..cab710b5ee5 100644
--- a/src/mongo/db/s/active_shard_collection_registry.h
+++ b/src/mongo/db/s/active_shard_collection_registry.h
@@ -31,7 +31,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/s/request_types/shard_collection_gen.h"
#include "mongo/stdx/memory.h"
#include "mongo/stdx/mutex.h"
@@ -49,7 +48,8 @@ class StatusWith;
* one instance of this object per shard.
*/
class ActiveShardCollectionRegistry {
- MONGO_DISALLOW_COPYING(ActiveShardCollectionRegistry);
+ ActiveShardCollectionRegistry(const ActiveShardCollectionRegistry&) = delete;
+ ActiveShardCollectionRegistry& operator=(const ActiveShardCollectionRegistry&) = delete;
public:
ActiveShardCollectionRegistry();
@@ -119,7 +119,8 @@ private:
* registerShardCollection method for more details.
*/
class ScopedShardCollection {
- MONGO_DISALLOW_COPYING(ScopedShardCollection);
+ ScopedShardCollection(const ScopedShardCollection&) = delete;
+ ScopedShardCollection& operator=(const ScopedShardCollection&) = delete;
public:
ScopedShardCollection(std::string nss,
diff --git a/src/mongo/db/s/balancer/balancer.h b/src/mongo/db/s/balancer/balancer.h
index 91a8e9280b6..2b6738def19 100644
--- a/src/mongo/db/s/balancer/balancer.h
+++ b/src/mongo/db/s/balancer/balancer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/balancer/balancer_chunk_selection_policy.h"
#include "mongo/db/s/balancer/balancer_random.h"
#include "mongo/db/s/balancer/migration_manager.h"
@@ -55,7 +54,8 @@ class Status;
* loaded shards. It would issue a request for a chunk migration per round, if it found so.
*/
class Balancer {
- MONGO_DISALLOW_COPYING(Balancer);
+ Balancer(const Balancer&) = delete;
+ Balancer& operator=(const Balancer&) = delete;
public:
Balancer(ServiceContext* serviceContext);
diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h
index eff68e36462..2557cebd602 100644
--- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h
+++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/balancer/balancer_policy.h"
#include "mongo/s/catalog/type_chunk.h"
#include "mongo/s/chunk_version.h"
@@ -51,7 +50,8 @@ class StatusWith;
* 'balanced' means.
*/
class BalancerChunkSelectionPolicy {
- MONGO_DISALLOW_COPYING(BalancerChunkSelectionPolicy);
+ BalancerChunkSelectionPolicy(const BalancerChunkSelectionPolicy&) = delete;
+ BalancerChunkSelectionPolicy& operator=(const BalancerChunkSelectionPolicy&) = delete;
public:
/**
diff --git a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp
index 56dbb896b30..93fdf758f9c 100644
--- a/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp
+++ b/src/mongo/db/s/balancer/balancer_chunk_selection_policy_impl.cpp
@@ -117,7 +117,8 @@ StatusWith<DistributionStatus> createCollectionDistributionStatus(
* splitting a chunk does not yield the same chunk anymore.
*/
class SplitCandidatesBuffer {
- MONGO_DISALLOW_COPYING(SplitCandidatesBuffer);
+ SplitCandidatesBuffer(const SplitCandidatesBuffer&) = delete;
+ SplitCandidatesBuffer& operator=(const SplitCandidatesBuffer&) = delete;
public:
SplitCandidatesBuffer(NamespaceString nss, ChunkVersion collectionVersion)
diff --git a/src/mongo/db/s/balancer/balancer_policy.h b/src/mongo/db/s/balancer/balancer_policy.h
index dbeeb6d86cc..28592a34743 100644
--- a/src/mongo/db/s/balancer/balancer_policy.h
+++ b/src/mongo/db/s/balancer/balancer_policy.h
@@ -32,7 +32,6 @@
#include <set>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/namespace_string.h"
@@ -76,7 +75,8 @@ typedef std::map<ShardId, std::vector<ChunkType>> ShardToChunksMap;
* query utilization statististics and to decide what to balance.
*/
class DistributionStatus {
- MONGO_DISALLOW_COPYING(DistributionStatus);
+ DistributionStatus(const DistributionStatus&) = delete;
+ DistributionStatus& operator=(const DistributionStatus&) = delete;
public:
DistributionStatus(NamespaceString nss, ShardToChunksMap shardToChunksMap);
diff --git a/src/mongo/db/s/balancer/cluster_statistics.h b/src/mongo/db/s/balancer/cluster_statistics.h
index 4531d496403..32f6cb9f7c5 100644
--- a/src/mongo/db/s/balancer/cluster_statistics.h
+++ b/src/mongo/db/s/balancer/cluster_statistics.h
@@ -34,7 +34,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/s/client/shard.h"
namespace mongo {
@@ -50,7 +49,8 @@ class StatusWith;
* the statistics collection. There should be one instance of this object per service context.
*/
class ClusterStatistics {
- MONGO_DISALLOW_COPYING(ClusterStatistics);
+ ClusterStatistics(const ClusterStatistics&) = delete;
+ ClusterStatistics& operator=(const ClusterStatistics&) = delete;
public:
/**
diff --git a/src/mongo/db/s/balancer/migration_manager.h b/src/mongo/db/s/balancer/migration_manager.h
index 81adb434c33..4f6c1288571 100644
--- a/src/mongo/db/s/balancer/migration_manager.h
+++ b/src/mongo/db/s/balancer/migration_manager.h
@@ -33,7 +33,6 @@
#include <map>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/s/balancer/balancer_policy.h"
@@ -64,7 +63,8 @@ typedef std::map<MigrationIdentifier, Status> MigrationStatuses;
* Manages and executes parallel migrations for the balancer.
*/
class MigrationManager {
- MONGO_DISALLOW_COPYING(MigrationManager);
+ MigrationManager(const MigrationManager&) = delete;
+ MigrationManager& operator=(const MigrationManager&) = delete;
public:
MigrationManager(ServiceContext* serviceContext);
diff --git a/src/mongo/db/s/balancer/scoped_migration_request.h b/src/mongo/db/s/balancer/scoped_migration_request.h
index ecbb3f4c9ea..bfb58ba103c 100644
--- a/src/mongo/db/s/balancer/scoped_migration_request.h
+++ b/src/mongo/db/s/balancer/scoped_migration_request.h
@@ -46,7 +46,8 @@ namespace mongo {
* This class should only be used by the Balancer!
*/
class ScopedMigrationRequest {
- MONGO_DISALLOW_COPYING(ScopedMigrationRequest);
+ ScopedMigrationRequest(const ScopedMigrationRequest&) = delete;
+ ScopedMigrationRequest& operator=(const ScopedMigrationRequest&) = delete;
public:
/**
diff --git a/src/mongo/db/s/catalog_cache_loader_mock.h b/src/mongo/db/s/catalog_cache_loader_mock.h
index 9420e4daed6..a325a9574b9 100644
--- a/src/mongo/db/s/catalog_cache_loader_mock.h
+++ b/src/mongo/db/s/catalog_cache_loader_mock.h
@@ -39,7 +39,8 @@ namespace mongo {
* facilitate testing of classes that use a CatalogCacheLoader.
*/
class CatalogCacheLoaderMock final : public CatalogCacheLoader {
- MONGO_DISALLOW_COPYING(CatalogCacheLoaderMock);
+ CatalogCacheLoaderMock(const CatalogCacheLoaderMock&) = delete;
+ CatalogCacheLoaderMock& operator=(const CatalogCacheLoaderMock&) = delete;
public:
CatalogCacheLoaderMock();
diff --git a/src/mongo/db/s/chunk_split_state_driver.h b/src/mongo/db/s/chunk_split_state_driver.h
index 711d35696e4..9c65bfb7cf3 100644
--- a/src/mongo/db/s/chunk_split_state_driver.h
+++ b/src/mongo/db/s/chunk_split_state_driver.h
@@ -33,7 +33,6 @@
#include <boost/optional.hpp>
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/s/chunk_writes_tracker.h"
@@ -47,7 +46,8 @@ namespace mongo {
* the ChunkSplitter which will drive these state changes.
*/
class ChunkSplitStateDriver final {
- MONGO_DISALLOW_COPYING(ChunkSplitStateDriver);
+ ChunkSplitStateDriver(const ChunkSplitStateDriver&) = delete;
+ ChunkSplitStateDriver& operator=(const ChunkSplitStateDriver&) = delete;
public:
/**
diff --git a/src/mongo/db/s/chunk_splitter.h b/src/mongo/db/s/chunk_splitter.h
index d942752f126..ef774dc017c 100644
--- a/src/mongo/db/s/chunk_splitter.h
+++ b/src/mongo/db/s/chunk_splitter.h
@@ -43,7 +43,8 @@ class ChunkSplitStateDriver;
* Handles asynchronous auto-splitting of chunks.
*/
class ChunkSplitter {
- MONGO_DISALLOW_COPYING(ChunkSplitter);
+ ChunkSplitter(const ChunkSplitter&) = delete;
+ ChunkSplitter& operator=(const ChunkSplitter&) = delete;
public:
ChunkSplitter();
diff --git a/src/mongo/db/s/collection_range_deleter.h b/src/mongo/db/s/collection_range_deleter.h
index cbd67f3fa51..9a084fdcf35 100644
--- a/src/mongo/db/s/collection_range_deleter.h
+++ b/src/mongo/db/s/collection_range_deleter.h
@@ -30,7 +30,6 @@
#include <list>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/namespace_string.h"
#include "mongo/executor/task_executor.h"
#include "mongo/s/catalog/type_chunk.h"
@@ -55,7 +54,8 @@ extern AtomicWord<int> rangeDeleterBatchSize;
extern AtomicWord<int> rangeDeleterBatchDelayMS;
class CollectionRangeDeleter {
- MONGO_DISALLOW_COPYING(CollectionRangeDeleter);
+ CollectionRangeDeleter(const CollectionRangeDeleter&) = delete;
+ CollectionRangeDeleter& operator=(const CollectionRangeDeleter&) = delete;
public:
/**
diff --git a/src/mongo/db/s/collection_sharding_runtime.h b/src/mongo/db/s/collection_sharding_runtime.h
index 3c14a46db31..d2aefc10ff4 100644
--- a/src/mongo/db/s/collection_sharding_runtime.h
+++ b/src/mongo/db/s/collection_sharding_runtime.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/s/collection_sharding_state.h"
@@ -48,7 +47,8 @@ extern AtomicWord<int> migrationLockAcquisitionMaxWaitMS;
*/
class CollectionShardingRuntime final : public CollectionShardingState,
public Decorable<CollectionShardingRuntime> {
- MONGO_DISALLOW_COPYING(CollectionShardingRuntime);
+ CollectionShardingRuntime(const CollectionShardingRuntime&) = delete;
+ CollectionShardingRuntime& operator=(const CollectionShardingRuntime&) = delete;
public:
CollectionShardingRuntime(ServiceContext* sc,
@@ -163,7 +163,8 @@ private:
* RAII-style class, which obtains a reference to the critical section for the specified collection.
*/
class CollectionCriticalSection {
- MONGO_DISALLOW_COPYING(CollectionCriticalSection);
+ CollectionCriticalSection(const CollectionCriticalSection&) = delete;
+ CollectionCriticalSection& operator=(const CollectionCriticalSection&) = delete;
public:
CollectionCriticalSection(OperationContext* opCtx, NamespaceString ns);
diff --git a/src/mongo/db/s/collection_sharding_state.cpp b/src/mongo/db/s/collection_sharding_state.cpp
index 1ce7bd0f7b2..7c572a029cd 100644
--- a/src/mongo/db/s/collection_sharding_state.cpp
+++ b/src/mongo/db/s/collection_sharding_state.cpp
@@ -44,7 +44,8 @@ namespace mongo {
namespace {
class CollectionShardingStateMap {
- MONGO_DISALLOW_COPYING(CollectionShardingStateMap);
+ CollectionShardingStateMap(const CollectionShardingStateMap&) = delete;
+ CollectionShardingStateMap& operator=(const CollectionShardingStateMap&) = delete;
public:
static const ServiceContext::Decoration<boost::optional<CollectionShardingStateMap>> get;
diff --git a/src/mongo/db/s/collection_sharding_state.h b/src/mongo/db/s/collection_sharding_state.h
index 1f1a0c76e6f..9991a1811ab 100644
--- a/src/mongo/db/s/collection_sharding_state.h
+++ b/src/mongo/db/s/collection_sharding_state.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/logical_time.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/s/scoped_collection_metadata.h"
@@ -53,7 +52,8 @@ namespace mongo {
* lock on the respective collection.
*/
class CollectionShardingState {
- MONGO_DISALLOW_COPYING(CollectionShardingState);
+ CollectionShardingState(const CollectionShardingState&) = delete;
+ CollectionShardingState& operator=(const CollectionShardingState&) = delete;
public:
using CSRLock = ShardingStateLock<CollectionShardingState>;
@@ -172,7 +172,8 @@ private:
* which is running.
*/
class CollectionShardingStateFactory {
- MONGO_DISALLOW_COPYING(CollectionShardingStateFactory);
+ CollectionShardingStateFactory(const CollectionShardingStateFactory&) = delete;
+ CollectionShardingStateFactory& operator=(const CollectionShardingStateFactory&) = delete;
public:
static void set(ServiceContext* service,
diff --git a/src/mongo/db/s/config/namespace_serializer.h b/src/mongo/db/s/config/namespace_serializer.h
index aecc08f9355..7b7832ebbe7 100644
--- a/src/mongo/db/s/config/namespace_serializer.h
+++ b/src/mongo/db/s/config/namespace_serializer.h
@@ -44,7 +44,8 @@ namespace mongo {
class OperationContext;
class NamespaceSerializer {
- MONGO_DISALLOW_COPYING(NamespaceSerializer);
+ NamespaceSerializer(const NamespaceSerializer&) = delete;
+ NamespaceSerializer& operator=(const NamespaceSerializer&) = delete;
public:
class ScopedLock {
diff --git a/src/mongo/db/s/config/sharding_catalog_manager.h b/src/mongo/db/s/config/sharding_catalog_manager.h
index 071085395cc..f60833c490e 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager.h
+++ b/src/mongo/db/s/config/sharding_catalog_manager.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/repl/optime_with.h"
@@ -69,7 +68,8 @@ enum ShardDrainingStatus {
* moved out of ShardingCatalogClient and into this class.
*/
class ShardingCatalogManager {
- MONGO_DISALLOW_COPYING(ShardingCatalogManager);
+ ShardingCatalogManager(const ShardingCatalogManager&) = delete;
+ ShardingCatalogManager& operator=(const ShardingCatalogManager&) = delete;
friend class ConfigSvrShardCollectionCommand;
public:
diff --git a/src/mongo/db/s/config_server_op_observer.h b/src/mongo/db/s/config_server_op_observer.h
index 08e1dfd0cf4..bf804fbf6c4 100644
--- a/src/mongo/db/s/config_server_op_observer.h
+++ b/src/mongo/db/s/config_server_op_observer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/op_observer.h"
namespace mongo {
@@ -39,7 +38,8 @@ namespace mongo {
* server (--configsvr).
*/
class ConfigServerOpObserver final : public OpObserver {
- MONGO_DISALLOW_COPYING(ConfigServerOpObserver);
+ ConfigServerOpObserver(const ConfigServerOpObserver&) = delete;
+ ConfigServerOpObserver& operator=(const ConfigServerOpObserver&) = delete;
public:
ConfigServerOpObserver();
diff --git a/src/mongo/db/s/database_sharding_state.h b/src/mongo/db/s/database_sharding_state.h
index 2cd7be76f04..a580e5bf4dc 100644
--- a/src/mongo/db/s/database_sharding_state.h
+++ b/src/mongo/db/s/database_sharding_state.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/catalog/database.h"
#include "mongo/db/s/sharding_migration_critical_section.h"
#include "mongo/db/s/sharding_state_lock.h"
@@ -44,7 +43,8 @@ class OperationContext;
* Synchronizes access to this shard server's cached database version for Database.
*/
class DatabaseShardingState {
- MONGO_DISALLOW_COPYING(DatabaseShardingState);
+ DatabaseShardingState(const DatabaseShardingState&) = delete;
+ DatabaseShardingState& operator=(const DatabaseShardingState&) = delete;
public:
/**
diff --git a/src/mongo/db/s/metadata_manager.h b/src/mongo/db/s/metadata_manager.h
index ca5e5f98048..9c7842386a1 100644
--- a/src/mongo/db/s/metadata_manager.h
+++ b/src/mongo/db/s/metadata_manager.h
@@ -31,7 +31,6 @@
#include <list>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/simple_bsonobj_comparator.h"
#include "mongo/db/logical_time.h"
#include "mongo/db/namespace_string.h"
@@ -50,7 +49,8 @@ namespace mongo {
class RangePreserver;
class MetadataManager {
- MONGO_DISALLOW_COPYING(MetadataManager);
+ MetadataManager(const MetadataManager&) = delete;
+ MetadataManager& operator=(const MetadataManager&) = delete;
public:
using CleanupNotification = CollectionRangeDeleter::DeleteNotification;
@@ -152,7 +152,8 @@ private:
* point in time along with a counter of how many queries are still using it.
*/
struct CollectionMetadataTracker {
- MONGO_DISALLOW_COPYING(CollectionMetadataTracker);
+ CollectionMetadataTracker(const CollectionMetadataTracker&) = delete;
+ CollectionMetadataTracker& operator=(const CollectionMetadataTracker&) = delete;
CollectionMetadataTracker(CollectionMetadata inMetadata)
: metadata(std::move(inMetadata)) {}
diff --git a/src/mongo/db/s/migration_chunk_cloner_source.h b/src/mongo/db/s/migration_chunk_cloner_source.h
index 3584c7f60f6..6a734595ba4 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source.h
+++ b/src/mongo/db/s/migration_chunk_cloner_source.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/time_support.h"
namespace mongo {
@@ -58,7 +57,8 @@ class OpTime;
* kicks off the cloning as soon as possible by calling startClone.
*/
class MigrationChunkClonerSource {
- MONGO_DISALLOW_COPYING(MigrationChunkClonerSource);
+ MigrationChunkClonerSource(const MigrationChunkClonerSource&) = delete;
+ MigrationChunkClonerSource& operator=(const MigrationChunkClonerSource&) = delete;
public:
virtual ~MigrationChunkClonerSource();
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
index aa8fda0530c..3874f03e76a 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
+++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.h
@@ -55,7 +55,8 @@ class Database;
class RecordId;
class MigrationChunkClonerSourceLegacy final : public MigrationChunkClonerSource {
- MONGO_DISALLOW_COPYING(MigrationChunkClonerSourceLegacy);
+ MigrationChunkClonerSourceLegacy(const MigrationChunkClonerSourceLegacy&) = delete;
+ MigrationChunkClonerSourceLegacy& operator=(const MigrationChunkClonerSourceLegacy&) = delete;
public:
MigrationChunkClonerSourceLegacy(MoveChunkRequest request,
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
index 192551cc5e7..fed421be24d 100644
--- a/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
+++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy_commands.cpp
@@ -57,7 +57,8 @@ namespace {
* the session ids match.
*/
class AutoGetActiveCloner {
- MONGO_DISALLOW_COPYING(AutoGetActiveCloner);
+ AutoGetActiveCloner(const AutoGetActiveCloner&) = delete;
+ AutoGetActiveCloner& operator=(const AutoGetActiveCloner&) = delete;
public:
AutoGetActiveCloner(OperationContext* opCtx, const MigrationSessionId& migrationSessionId) {
diff --git a/src/mongo/db/s/migration_destination_manager.h b/src/mongo/db/s/migration_destination_manager.h
index 655546c62bb..dcda2e37bee 100644
--- a/src/mongo/db/s/migration_destination_manager.h
+++ b/src/mongo/db/s/migration_destination_manager.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/bson/bsonobjbuilder.h"
@@ -64,7 +63,8 @@ class OpTime;
* Drives the receiving side of the MongoD migration process. One instance exists per shard.
*/
class MigrationDestinationManager {
- MONGO_DISALLOW_COPYING(MigrationDestinationManager);
+ MigrationDestinationManager(const MigrationDestinationManager&) = delete;
+ MigrationDestinationManager& operator=(const MigrationDestinationManager&) = delete;
public:
enum State { READY, CLONE, CATCHUP, STEADY, COMMIT_START, DONE, FAIL, ABORT };
diff --git a/src/mongo/db/s/migration_session_id.h b/src/mongo/db/s/migration_session_id.h
index 91016f3c8aa..923427822de 100644
--- a/src/mongo/db/s/migration_session_id.h
+++ b/src/mongo/db/s/migration_session_id.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
namespace mongo {
diff --git a/src/mongo/db/s/migration_source_manager.h b/src/mongo/db/s/migration_source_manager.h
index a01185f5269..b567b5ad7ce 100644
--- a/src/mongo/db/s/migration_source_manager.h
+++ b/src/mongo/db/s/migration_source_manager.h
@@ -31,7 +31,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/collection_sharding_runtime.h"
#include "mongo/db/s/migration_chunk_cloner_source.h"
#include "mongo/s/request_types/move_chunk_request.h"
@@ -68,7 +67,8 @@ struct ShardingStatistics;
* is the commitDonateChunk and its comments explain the reasoning.
*/
class MigrationSourceManager {
- MONGO_DISALLOW_COPYING(MigrationSourceManager);
+ MigrationSourceManager(const MigrationSourceManager&) = delete;
+ MigrationSourceManager& operator=(const MigrationSourceManager&) = delete;
public:
/**
diff --git a/src/mongo/db/s/move_primary_source_manager.h b/src/mongo/db/s/move_primary_source_manager.h
index eba8d63172a..51c78b4f408 100644
--- a/src/mongo/db/s/move_primary_source_manager.h
+++ b/src/mongo/db/s/move_primary_source_manager.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/database_sharding_state.h"
#include "mongo/s/request_types/move_primary_gen.h"
#include "mongo/s/shard_id.h"
@@ -62,7 +61,8 @@ class Status;
* which case the destructor will take care of clean up based on how far we have advanced.
*/
class MovePrimarySourceManager {
- MONGO_DISALLOW_COPYING(MovePrimarySourceManager);
+ MovePrimarySourceManager(const MovePrimarySourceManager&) = delete;
+ MovePrimarySourceManager& operator=(const MovePrimarySourceManager&) = delete;
public:
/**
diff --git a/src/mongo/db/s/namespace_metadata_change_notifications.h b/src/mongo/db/s/namespace_metadata_change_notifications.h
index f97714135da..ba7c51e86a0 100644
--- a/src/mongo/db/s/namespace_metadata_change_notifications.h
+++ b/src/mongo/db/s/namespace_metadata_change_notifications.h
@@ -32,7 +32,6 @@
#include <list>
#include <map>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/namespace_string.h"
#include "mongo/stdx/mutex.h"
#include "mongo/util/concurrency/notification.h"
@@ -45,7 +44,9 @@ class OperationContext;
* Map of one-snot notifications for changes to a particular namespace.
*/
class NamespaceMetadataChangeNotifications {
- MONGO_DISALLOW_COPYING(NamespaceMetadataChangeNotifications);
+ NamespaceMetadataChangeNotifications(const NamespaceMetadataChangeNotifications&) = delete;
+ NamespaceMetadataChangeNotifications& operator=(const NamespaceMetadataChangeNotifications&) =
+ delete;
struct NotificationToken;
@@ -60,7 +61,8 @@ public:
* out of scope, if it has not been signalled yet.
*/
class ScopedNotification {
- MONGO_DISALLOW_COPYING(ScopedNotification);
+ ScopedNotification(const ScopedNotification&) = delete;
+ ScopedNotification& operator=(const ScopedNotification&) = delete;
public:
ScopedNotification(NamespaceMetadataChangeNotifications* notifications,
diff --git a/src/mongo/db/s/operation_sharding_state.h b/src/mongo/db/s/operation_sharding_state.h
index 4358d6c9a21..c24b451e274 100644
--- a/src/mongo/db/s/operation_sharding_state.h
+++ b/src/mongo/db/s/operation_sharding_state.h
@@ -31,7 +31,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/namespace_string.h"
#include "mongo/s/chunk_version.h"
#include "mongo/s/database_version_gen.h"
@@ -51,7 +50,8 @@ class OperationContext;
* Note: This only supports storing the version for a single namespace.
*/
class OperationShardingState {
- MONGO_DISALLOW_COPYING(OperationShardingState);
+ OperationShardingState(const OperationShardingState&) = delete;
+ OperationShardingState& operator=(const OperationShardingState&) = delete;
public:
OperationShardingState();
diff --git a/src/mongo/db/s/periodic_balancer_config_refresher.h b/src/mongo/db/s/periodic_balancer_config_refresher.h
index 5407dd6baf3..96a36202025 100644
--- a/src/mongo/db/s/periodic_balancer_config_refresher.h
+++ b/src/mongo/db/s/periodic_balancer_config_refresher.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/periodic_runner.h"
namespace mongo {
@@ -38,7 +37,8 @@ class OperationContext;
class ServiceContext;
class PeriodicBalancerConfigRefresher final {
- MONGO_DISALLOW_COPYING(PeriodicBalancerConfigRefresher);
+ PeriodicBalancerConfigRefresher(const PeriodicBalancerConfigRefresher&) = delete;
+ PeriodicBalancerConfigRefresher& operator=(const PeriodicBalancerConfigRefresher&) = delete;
public:
PeriodicBalancerConfigRefresher() = default;
diff --git a/src/mongo/db/s/scoped_operation_completion_sharding_actions.h b/src/mongo/db/s/scoped_operation_completion_sharding_actions.h
index 039274b399f..de61f5fbfd2 100644
--- a/src/mongo/db/s/scoped_operation_completion_sharding_actions.h
+++ b/src/mongo/db/s/scoped_operation_completion_sharding_actions.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/polymorphic_scoped.h"
namespace mongo {
@@ -42,7 +41,10 @@ namespace mongo {
class OperationContext;
class ScopedOperationCompletionShardingActions : public PolymorphicScoped {
- MONGO_DISALLOW_COPYING(ScopedOperationCompletionShardingActions);
+ ScopedOperationCompletionShardingActions(const ScopedOperationCompletionShardingActions&) =
+ delete;
+ ScopedOperationCompletionShardingActions& operator=(
+ const ScopedOperationCompletionShardingActions&) = delete;
public:
ScopedOperationCompletionShardingActions(OperationContext* opCtx);
diff --git a/src/mongo/db/s/session_catalog_migration_destination.h b/src/mongo/db/s/session_catalog_migration_destination.h
index 821e56bea8e..89c43be2e62 100644
--- a/src/mongo/db/s/session_catalog_migration_destination.h
+++ b/src/mongo/db/s/session_catalog_migration_destination.h
@@ -32,7 +32,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/repl/oplog_entry.h"
@@ -54,7 +53,9 @@ class OperationContext;
* the source migration shard.
*/
class SessionCatalogMigrationDestination {
- MONGO_DISALLOW_COPYING(SessionCatalogMigrationDestination);
+ SessionCatalogMigrationDestination(const SessionCatalogMigrationDestination&) = delete;
+ SessionCatalogMigrationDestination& operator=(const SessionCatalogMigrationDestination&) =
+ delete;
public:
enum class State {
diff --git a/src/mongo/db/s/session_catalog_migration_source.h b/src/mongo/db/s/session_catalog_migration_source.h
index b866e89e84a..c84bc5fb713 100644
--- a/src/mongo/db/s/session_catalog_migration_source.h
+++ b/src/mongo/db/s/session_catalog_migration_source.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <memory>
-#include "mongo/base/disallow_copying.h"
#include "mongo/client/dbclient_cursor.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/repl/optime.h"
@@ -70,7 +69,8 @@ class ServiceContext;
* it would be wrong to wait for the highest opTime in this case.
*/
class SessionCatalogMigrationSource {
- MONGO_DISALLOW_COPYING(SessionCatalogMigrationSource);
+ SessionCatalogMigrationSource(const SessionCatalogMigrationSource&) = delete;
+ SessionCatalogMigrationSource& operator=(const SessionCatalogMigrationSource&) = delete;
public:
struct OplogResult {
diff --git a/src/mongo/db/s/shard_identity_rollback_notifier.h b/src/mongo/db/s/shard_identity_rollback_notifier.h
index b36109abbb0..7a5141f3fc8 100644
--- a/src/mongo/db/s/shard_identity_rollback_notifier.h
+++ b/src/mongo/db/s/shard_identity_rollback_notifier.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
namespace mongo {
@@ -52,7 +51,8 @@ class ServiceContext;
* exiting rollback, and there can only be one of those things happening at any given time.
*/
class ShardIdentityRollbackNotifier {
- MONGO_DISALLOW_COPYING(ShardIdentityRollbackNotifier);
+ ShardIdentityRollbackNotifier(const ShardIdentityRollbackNotifier&) = delete;
+ ShardIdentityRollbackNotifier& operator=(const ShardIdentityRollbackNotifier&) = delete;
public:
ShardIdentityRollbackNotifier();
diff --git a/src/mongo/db/s/shard_server_catalog_cache_loader.h b/src/mongo/db/s/shard_server_catalog_cache_loader.h
index c578217a3d5..9e998415793 100644
--- a/src/mongo/db/s/shard_server_catalog_cache_loader.h
+++ b/src/mongo/db/s/shard_server_catalog_cache_loader.h
@@ -46,7 +46,8 @@ namespace mongo {
* retrieves chunk metadata from the shard persisted chunk metadata.
*/
class ShardServerCatalogCacheLoader : public CatalogCacheLoader {
- MONGO_DISALLOW_COPYING(ShardServerCatalogCacheLoader);
+ ShardServerCatalogCacheLoader(const ShardServerCatalogCacheLoader&) = delete;
+ ShardServerCatalogCacheLoader& operator=(const ShardServerCatalogCacheLoader&) = delete;
public:
ShardServerCatalogCacheLoader(std::unique_ptr<CatalogCacheLoader> configServerLoader);
@@ -98,7 +99,8 @@ private:
* metadata for a specific collection.
*/
struct collAndChunkTask {
- MONGO_DISALLOW_COPYING(collAndChunkTask);
+ collAndChunkTask(const collAndChunkTask&) = delete;
+ collAndChunkTask& operator=(const collAndChunkTask&) = delete;
collAndChunkTask(collAndChunkTask&&) = default;
/**
@@ -234,7 +236,8 @@ private:
* metadata for a specific database.
*/
struct DBTask {
- MONGO_DISALLOW_COPYING(DBTask);
+ DBTask(const DBTask&) = delete;
+ DBTask& operator=(const DBTask&) = delete;
DBTask(DBTask&&) = default;
/**
diff --git a/src/mongo/db/s/shard_server_op_observer.h b/src/mongo/db/s/shard_server_op_observer.h
index e39089dbb32..339f5968bf8 100644
--- a/src/mongo/db/s/shard_server_op_observer.h
+++ b/src/mongo/db/s/shard_server_op_observer.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/op_observer.h"
#include "mongo/db/s/collection_sharding_runtime.h"
@@ -40,7 +39,8 @@ namespace mongo {
* server (--shardsvr).
*/
class ShardServerOpObserver final : public OpObserver {
- MONGO_DISALLOW_COPYING(ShardServerOpObserver);
+ ShardServerOpObserver(const ShardServerOpObserver&) = delete;
+ ShardServerOpObserver& operator=(const ShardServerOpObserver&) = delete;
public:
ShardServerOpObserver();
diff --git a/src/mongo/db/s/sharded_connection_info.h b/src/mongo/db/s/sharded_connection_info.h
index 1587f0be81b..e96cf41e49b 100644
--- a/src/mongo/db/s/sharded_connection_info.h
+++ b/src/mongo/db/s/sharded_connection_info.h
@@ -33,7 +33,6 @@
#include <map>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/s/chunk_version.h"
namespace mongo {
@@ -45,7 +44,8 @@ class Client;
* namespace.
*/
class ShardedConnectionInfo {
- MONGO_DISALLOW_COPYING(ShardedConnectionInfo);
+ ShardedConnectionInfo(const ShardedConnectionInfo&) = delete;
+ ShardedConnectionInfo& operator=(const ShardedConnectionInfo&) = delete;
public:
ShardedConnectionInfo();
diff --git a/src/mongo/db/s/sharding_initialization_mongod.h b/src/mongo/db/s/sharding_initialization_mongod.h
index 4c01387cf16..e26302b4bb2 100644
--- a/src/mongo/db/s/sharding_initialization_mongod.h
+++ b/src/mongo/db/s/sharding_initialization_mongod.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/db/s/sharding_state.h"
#include "mongo/db/s/type_shard_identity.h"
@@ -48,7 +47,8 @@ class ServiceContext;
* ShardingState in the initialized state.
*/
class ShardingInitializationMongoD {
- MONGO_DISALLOW_COPYING(ShardingInitializationMongoD);
+ ShardingInitializationMongoD(const ShardingInitializationMongoD&) = delete;
+ ShardingInitializationMongoD& operator=(const ShardingInitializationMongoD&) = delete;
public:
using ShardingEnvironmentInitFunc = stdx::function<void(
diff --git a/src/mongo/db/s/sharding_migration_critical_section.h b/src/mongo/db/s/sharding_migration_critical_section.h
index 2ab81097ee6..0dbc8fd4df4 100644
--- a/src/mongo/db/s/sharding_migration_critical_section.h
+++ b/src/mongo/db/s/sharding_migration_critical_section.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/concurrency/notification.h"
namespace mongo {
@@ -44,7 +43,8 @@ namespace mongo {
* transferred to the recipient shard. Databases effectively only support the commit phase.
*/
class ShardingMigrationCriticalSection {
- MONGO_DISALLOW_COPYING(ShardingMigrationCriticalSection);
+ ShardingMigrationCriticalSection(const ShardingMigrationCriticalSection&) = delete;
+ ShardingMigrationCriticalSection& operator=(const ShardingMigrationCriticalSection&) = delete;
public:
ShardingMigrationCriticalSection();
diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h
index 1755d33293e..4b78d0bdfb4 100644
--- a/src/mongo/db/s/sharding_state.h
+++ b/src/mongo/db/s/sharding_state.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/oid.h"
#include "mongo/s/shard_id.h"
#include "mongo/stdx/mutex.h"
@@ -50,7 +49,8 @@ class ServiceContext;
* never gets destroyed or uninitialized.
*/
class ShardingState {
- MONGO_DISALLOW_COPYING(ShardingState);
+ ShardingState(const ShardingState&) = delete;
+ ShardingState& operator=(const ShardingState&) = delete;
public:
ShardingState();
diff --git a/src/mongo/db/s/sharding_state_lock.h b/src/mongo/db/s/sharding_state_lock.h
index fc0bae7c4c1..620cd5f53a0 100644
--- a/src/mongo/db/s/sharding_state_lock.h
+++ b/src/mongo/db/s/sharding_state_lock.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/stdx/variant.h"
diff --git a/src/mongo/db/s/transaction_coordinator.h b/src/mongo/db/s/transaction_coordinator.h
index d47a39b9a88..a6bd7642d10 100644
--- a/src/mongo/db/s/transaction_coordinator.h
+++ b/src/mongo/db/s/transaction_coordinator.h
@@ -45,7 +45,8 @@ namespace mongo {
* `onCompletion()`.
*/
class TransactionCoordinator {
- MONGO_DISALLOW_COPYING(TransactionCoordinator);
+ TransactionCoordinator(const TransactionCoordinator&) = delete;
+ TransactionCoordinator& operator=(const TransactionCoordinator&) = delete;
public:
/**
diff --git a/src/mongo/db/s/transaction_coordinator_catalog.h b/src/mongo/db/s/transaction_coordinator_catalog.h
index 1605dbe8869..bc57f65e633 100644
--- a/src/mongo/db/s/transaction_coordinator_catalog.h
+++ b/src/mongo/db/s/transaction_coordinator_catalog.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <map>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/transaction_coordinator.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/util/concurrency/with_lock.h"
@@ -44,7 +43,8 @@ namespace mongo {
* txnNumber. It supports holding several coordinator objects per session.
*/
class TransactionCoordinatorCatalog {
- MONGO_DISALLOW_COPYING(TransactionCoordinatorCatalog);
+ TransactionCoordinatorCatalog(const TransactionCoordinatorCatalog&) = delete;
+ TransactionCoordinatorCatalog& operator=(const TransactionCoordinatorCatalog&) = delete;
public:
TransactionCoordinatorCatalog();
diff --git a/src/mongo/db/s/transaction_coordinator_driver.h b/src/mongo/db/s/transaction_coordinator_driver.h
index bc9bbb825af..d4833562a2c 100644
--- a/src/mongo/db/s/transaction_coordinator_driver.h
+++ b/src/mongo/db/s/transaction_coordinator_driver.h
@@ -88,7 +88,8 @@ struct PrepareVoteConsensus {
* no other operations are allowed until any returned futures are signalled.
*/
class TransactionCoordinatorDriver {
- MONGO_DISALLOW_COPYING(TransactionCoordinatorDriver);
+ TransactionCoordinatorDriver(const TransactionCoordinatorDriver&) = delete;
+ TransactionCoordinatorDriver& operator=(const TransactionCoordinatorDriver&) = delete;
public:
TransactionCoordinatorDriver(ServiceContext* serviceContext,
diff --git a/src/mongo/db/s/transaction_coordinator_service.h b/src/mongo/db/s/transaction_coordinator_service.h
index 9cfdc68faab..8dfa59213e7 100644
--- a/src/mongo/db/s/transaction_coordinator_service.h
+++ b/src/mongo/db/s/transaction_coordinator_service.h
@@ -29,13 +29,13 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/s/transaction_coordinator_catalog.h"
namespace mongo {
class TransactionCoordinatorService {
- MONGO_DISALLOW_COPYING(TransactionCoordinatorService);
+ TransactionCoordinatorService(const TransactionCoordinatorService&) = delete;
+ TransactionCoordinatorService& operator=(const TransactionCoordinatorService&) = delete;
public:
TransactionCoordinatorService();
diff --git a/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp b/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp
index 06f8b8fa0c4..1ff67ff3257 100644
--- a/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp
+++ b/src/mongo/db/s/wait_for_ongoing_chunk_splits_command.cpp
@@ -39,7 +39,8 @@ namespace mongo {
namespace {
class WaitForOngoingChunksSplitsCommand final : public BasicCommand {
- MONGO_DISALLOW_COPYING(WaitForOngoingChunksSplitsCommand);
+ WaitForOngoingChunksSplitsCommand(const WaitForOngoingChunksSplitsCommand&) = delete;
+ WaitForOngoingChunksSplitsCommand& operator=(const WaitForOngoingChunksSplitsCommand&) = delete;
public:
WaitForOngoingChunksSplitsCommand() : BasicCommand("waitForOngoingChunkSplits") {}
diff --git a/src/mongo/db/server_transactions_metrics.h b/src/mongo/db/server_transactions_metrics.h
index c6648bc2b01..035e9ad6ee0 100644
--- a/src/mongo/db/server_transactions_metrics.h
+++ b/src/mongo/db/server_transactions_metrics.h
@@ -43,7 +43,8 @@ namespace mongo {
* Container for server-wide multi-document transaction statistics.
*/
class ServerTransactionsMetrics {
- MONGO_DISALLOW_COPYING(ServerTransactionsMetrics);
+ ServerTransactionsMetrics(const ServerTransactionsMetrics&) = delete;
+ ServerTransactionsMetrics& operator=(const ServerTransactionsMetrics&) = delete;
public:
ServerTransactionsMetrics() = default;
diff --git a/src/mongo/db/service_context.h b/src/mongo/db/service_context.h
index 5e54e8684d9..8a9741bcc42 100644
--- a/src/mongo/db/service_context.h
+++ b/src/mongo/db/service_context.h
@@ -33,7 +33,6 @@
#include <functional>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/global_initializer_registerer.h"
#include "mongo/db/logical_session_id.h"
#include "mongo/db/storage/storage_engine.h"
@@ -70,7 +69,8 @@ class TransportLayer;
* including limitations on the lifetime of registered listeners.
*/
class KillOpListenerInterface {
- MONGO_DISALLOW_COPYING(KillOpListenerInterface);
+ KillOpListenerInterface(const KillOpListenerInterface&) = delete;
+ KillOpListenerInterface& operator=(const KillOpListenerInterface&) = delete;
public:
/**
@@ -95,7 +95,8 @@ protected:
* zero or more Clients, which in turn each own OperationContexts.
*/
class ServiceContext final : public Decorable<ServiceContext> {
- MONGO_DISALLOW_COPYING(ServiceContext);
+ ServiceContext(const ServiceContext&) = delete;
+ ServiceContext& operator=(const ServiceContext&) = delete;
public:
/**
diff --git a/src/mongo/db/service_entry_point_common.cpp b/src/mongo/db/service_entry_point_common.cpp
index 279962bb37f..a3077e08a38 100644
--- a/src/mongo/db/service_entry_point_common.cpp
+++ b/src/mongo/db/service_entry_point_common.cpp
@@ -198,7 +198,8 @@ void generateErrorResponse(OperationContext* opCtx,
* elsewhere.
*/
class MaintenanceModeSetter {
- MONGO_DISALLOW_COPYING(MaintenanceModeSetter);
+ MaintenanceModeSetter(const MaintenanceModeSetter&) = delete;
+ MaintenanceModeSetter& operator=(const MaintenanceModeSetter&) = delete;
public:
MaintenanceModeSetter(OperationContext* opCtx)
diff --git a/src/mongo/db/service_entry_point_mongod.h b/src/mongo/db/service_entry_point_mongod.h
index 9845e7ffdb3..57946da4d0e 100644
--- a/src/mongo/db/service_entry_point_mongod.h
+++ b/src/mongo/db/service_entry_point_mongod.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/transport/service_entry_point_impl.h"
namespace mongo {
@@ -38,7 +37,8 @@ namespace mongo {
* The entry point into mongod. Just a wrapper around assembleResponse.
*/
class ServiceEntryPointMongod final : public ServiceEntryPointImpl {
- MONGO_DISALLOW_COPYING(ServiceEntryPointMongod);
+ ServiceEntryPointMongod(const ServiceEntryPointMongod&) = delete;
+ ServiceEntryPointMongod& operator=(const ServiceEntryPointMongod&) = delete;
public:
using ServiceEntryPointImpl::ServiceEntryPointImpl;
diff --git a/src/mongo/db/session.h b/src/mongo/db/session.h
index bd9d4d0dcbd..635f3fc7167 100644
--- a/src/mongo/db/session.h
+++ b/src/mongo/db/session.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/logical_session_id.h"
#include "mongo/db/operation_context.h"
#include "mongo/util/concurrency/with_lock.h"
@@ -42,7 +41,8 @@ namespace mongo {
* server. Refer to SessionCatalog for more information on the semantics of sessions.
*/
class Session : public Decorable<Session> {
- MONGO_DISALLOW_COPYING(Session);
+ Session(const Session&) = delete;
+ Session& operator=(const Session&) = delete;
friend class ObservableSession;
friend class SessionCatalog;
diff --git a/src/mongo/db/session_catalog.h b/src/mongo/db/session_catalog.h
index 23d656579f5..73cfcf40b1a 100644
--- a/src/mongo/db/session_catalog.h
+++ b/src/mongo/db/session_catalog.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/client.h"
#include "mongo/db/logical_session_id.h"
#include "mongo/db/operation_context.h"
@@ -51,7 +50,8 @@ class ObservableSession;
* Keeps track of the transaction runtime state for every active session on this instance.
*/
class SessionCatalog {
- MONGO_DISALLOW_COPYING(SessionCatalog);
+ SessionCatalog(const SessionCatalog&) = delete;
+ SessionCatalog& operator=(const SessionCatalog&) = delete;
friend class ObservableSession;
friend class OperationContextSession;
@@ -295,7 +295,8 @@ private:
* at destruction.
*/
class OperationContextSession {
- MONGO_DISALLOW_COPYING(OperationContextSession);
+ OperationContextSession(const OperationContextSession&) = delete;
+ OperationContextSession& operator=(const OperationContextSession&) = delete;
public:
/**
diff --git a/src/mongo/db/sorter/sorter.h b/src/mongo/db/sorter/sorter.h
index 73e1eedbe92..f504d466ac3 100644
--- a/src/mongo/db/sorter/sorter.h
+++ b/src/mongo/db/sorter/sorter.h
@@ -36,7 +36,6 @@
#include <utility>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/util/builder.h"
/**
@@ -134,7 +133,8 @@ struct SortOptions {
*/
template <typename Key, typename Value>
class SortIteratorInterface {
- MONGO_DISALLOW_COPYING(SortIteratorInterface);
+ SortIteratorInterface(const SortIteratorInterface&) = delete;
+ SortIteratorInterface& operator=(const SortIteratorInterface&) = delete;
public:
typedef std::pair<Key, Value> Data;
@@ -179,7 +179,8 @@ protected:
*/
template <typename Key, typename Value>
class Sorter {
- MONGO_DISALLOW_COPYING(Sorter);
+ Sorter(const Sorter&) = delete;
+ Sorter& operator=(const Sorter&) = delete;
public:
typedef std::pair<Key, Value> Data;
@@ -219,7 +220,8 @@ protected:
*/
template <typename Key, typename Value>
class SortedFileWriter {
- MONGO_DISALLOW_COPYING(SortedFileWriter);
+ SortedFileWriter(const SortedFileWriter&) = delete;
+ SortedFileWriter& operator=(const SortedFileWriter&) = delete;
public:
typedef SortIteratorInterface<Key, Value> Iterator;
diff --git a/src/mongo/db/stats/server_read_concern_metrics.h b/src/mongo/db/stats/server_read_concern_metrics.h
index c1fb8626d95..1a247f79df6 100644
--- a/src/mongo/db/stats/server_read_concern_metrics.h
+++ b/src/mongo/db/stats/server_read_concern_metrics.h
@@ -40,7 +40,8 @@ namespace mongo {
* Container for server-wide statistics on readConcern levels used by operations.
*/
class ServerReadConcernMetrics {
- MONGO_DISALLOW_COPYING(ServerReadConcernMetrics);
+ ServerReadConcernMetrics(const ServerReadConcernMetrics&) = delete;
+ ServerReadConcernMetrics& operator=(const ServerReadConcernMetrics&) = delete;
public:
ServerReadConcernMetrics() = default;
diff --git a/src/mongo/db/stats/server_write_concern_metrics.h b/src/mongo/db/stats/server_write_concern_metrics.h
index 2a0c67f911c..e6faaaf1641 100644
--- a/src/mongo/db/stats/server_write_concern_metrics.h
+++ b/src/mongo/db/stats/server_write_concern_metrics.h
@@ -39,7 +39,8 @@ namespace mongo {
* Container for server-wide statistics on writeConcern levels used by operations.
*/
class ServerWriteConcernMetrics {
- MONGO_DISALLOW_COPYING(ServerWriteConcernMetrics);
+ ServerWriteConcernMetrics(const ServerWriteConcernMetrics&) = delete;
+ ServerWriteConcernMetrics& operator=(const ServerWriteConcernMetrics&) = delete;
public:
ServerWriteConcernMetrics() = default;
diff --git a/src/mongo/db/storage/biggie/biggie_kv_engine.cpp b/src/mongo/db/storage/biggie/biggie_kv_engine.cpp
index ad51f1ca25a..1ece635c229 100644
--- a/src/mongo/db/storage/biggie/biggie_kv_engine.cpp
+++ b/src/mongo/db/storage/biggie/biggie_kv_engine.cpp
@@ -31,7 +31,6 @@
#include "mongo/platform/basic.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/index/index_descriptor.h"
#include "mongo/db/snapshot_window_options.h"
#include "mongo/db/storage/biggie/biggie_kv_engine.h"
diff --git a/src/mongo/db/storage/devnull/devnull_kv_engine.cpp b/src/mongo/db/storage/devnull/devnull_kv_engine.cpp
index a8f0fac6489..6ae745c5587 100644
--- a/src/mongo/db/storage/devnull/devnull_kv_engine.cpp
+++ b/src/mongo/db/storage/devnull/devnull_kv_engine.cpp
@@ -31,7 +31,6 @@
#include "mongo/db/storage/devnull/devnull_kv_engine.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/snapshot_window_options.h"
#include "mongo/db/storage/ephemeral_for_test/ephemeral_for_test_record_store.h"
#include "mongo/db/storage/record_store.h"
@@ -177,7 +176,8 @@ private:
};
class DevNullSortedDataBuilderInterface : public SortedDataBuilderInterface {
- MONGO_DISALLOW_COPYING(DevNullSortedDataBuilderInterface);
+ DevNullSortedDataBuilderInterface(const DevNullSortedDataBuilderInterface&) = delete;
+ DevNullSortedDataBuilderInterface& operator=(const DevNullSortedDataBuilderInterface&) = delete;
public:
DevNullSortedDataBuilderInterface() {}
diff --git a/src/mongo/db/storage/encryption_hooks.h b/src/mongo/db/storage/encryption_hooks.h
index 68760531dea..f5a5db60923 100644
--- a/src/mongo/db/storage/encryption_hooks.h
+++ b/src/mongo/db/storage/encryption_hooks.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/jsobj.h"
namespace boost {
diff --git a/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.h b/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.h
index dfd048ca67d..c249d9af0ba 100644
--- a/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.h
+++ b/src/mongo/db/storage/kv/kv_drop_pending_ident_reaper.h
@@ -34,7 +34,6 @@
#include <set>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/namespace_string.h"
@@ -58,7 +57,8 @@ namespace mongo {
* dropldentsOlderThan() is provided for this purpose.
*/
class KVDropPendingIdentReaper {
- MONGO_DISALLOW_COPYING(KVDropPendingIdentReaper);
+ KVDropPendingIdentReaper(const KVDropPendingIdentReaper&) = delete;
+ KVDropPendingIdentReaper& operator=(const KVDropPendingIdentReaper&) = delete;
public:
explicit KVDropPendingIdentReaper(KVEngine* engine);
diff --git a/src/mongo/db/storage/mobile/mobile_session.h b/src/mongo/db/storage/mobile/mobile_session.h
index f4126fe605a..6e48caed880 100644
--- a/src/mongo/db/storage/mobile/mobile_session.h
+++ b/src/mongo/db/storage/mobile/mobile_session.h
@@ -32,7 +32,6 @@
#include <sqlite3.h>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/storage/mobile/mobile_session_pool.h"
namespace mongo {
@@ -42,7 +41,8 @@ class MobileSessionPool;
* This class manages a SQLite database connection object.
*/
class MobileSession final {
- MONGO_DISALLOW_COPYING(MobileSession);
+ MobileSession(const MobileSession&) = delete;
+ MobileSession& operator=(const MobileSession&) = delete;
public:
MobileSession(sqlite3* session, MobileSessionPool* sessionPool);
diff --git a/src/mongo/db/storage/mobile/mobile_session_pool.h b/src/mongo/db/storage/mobile/mobile_session_pool.h
index 8db3d92ee92..90535091fd8 100644
--- a/src/mongo/db/storage/mobile/mobile_session_pool.h
+++ b/src/mongo/db/storage/mobile/mobile_session_pool.h
@@ -34,7 +34,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/operation_context.h"
#include "mongo/db/storage/mobile/mobile_session.h"
#include "mongo/stdx/mutex.h"
@@ -46,7 +45,8 @@ class MobileSession;
* This class manages a queue of operations delayed for some reason
*/
class MobileDelayedOpQueue final {
- MONGO_DISALLOW_COPYING(MobileDelayedOpQueue);
+ MobileDelayedOpQueue(const MobileDelayedOpQueue&) = delete;
+ MobileDelayedOpQueue& operator=(const MobileDelayedOpQueue&) = delete;
public:
MobileDelayedOpQueue();
@@ -65,7 +65,8 @@ private:
* This class manages a pool of open sqlite3* objects.
*/
class MobileSessionPool final {
- MONGO_DISALLOW_COPYING(MobileSessionPool);
+ MobileSessionPool(const MobileSessionPool&) = delete;
+ MobileSessionPool& operator=(const MobileSessionPool&) = delete;
public:
MobileSessionPool(const std::string& path, std::uint64_t maxPoolSize = 80);
diff --git a/src/mongo/db/storage/record_store.h b/src/mongo/db/storage/record_store.h
index af9faa245d8..5389e8f6439 100644
--- a/src/mongo/db/storage/record_store.h
+++ b/src/mongo/db/storage/record_store.h
@@ -239,7 +239,8 @@ public:
* for MMAPv1 is this class not thread-safe.
*/
class RecordStore {
- MONGO_DISALLOW_COPYING(RecordStore);
+ RecordStore(const RecordStore&) = delete;
+ RecordStore& operator=(const RecordStore&) = delete;
public:
RecordStore(StringData ns) : _ns(ns.toString()) {}
diff --git a/src/mongo/db/storage/recovery_unit.h b/src/mongo/db/storage/recovery_unit.h
index ce62e0ba29a..6403135fa12 100644
--- a/src/mongo/db/storage/recovery_unit.h
+++ b/src/mongo/db/storage/recovery_unit.h
@@ -33,7 +33,6 @@
#include <stdlib.h>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/repl/read_concern_level.h"
@@ -50,7 +49,8 @@ class OperationContext;
* and an operator to add the statistics values.
*/
class StorageStats {
- MONGO_DISALLOW_COPYING(StorageStats);
+ StorageStats(const StorageStats&) = delete;
+ StorageStats& operator=(const StorageStats&) = delete;
public:
StorageStats() = default;
@@ -80,7 +80,8 @@ public:
* All on-disk information must be mutated through this interface.
*/
class RecoveryUnit {
- MONGO_DISALLOW_COPYING(RecoveryUnit);
+ RecoveryUnit(const RecoveryUnit&) = delete;
+ RecoveryUnit& operator=(const RecoveryUnit&) = delete;
public:
virtual ~RecoveryUnit() {}
diff --git a/src/mongo/db/storage/remove_saver.h b/src/mongo/db/storage/remove_saver.h
index d64604ad7a8..0704ddb4d49 100644
--- a/src/mongo/db/storage/remove_saver.h
+++ b/src/mongo/db/storage/remove_saver.h
@@ -34,7 +34,6 @@
#include <ostream>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/storage/data_protector.h"
@@ -48,7 +47,8 @@ namespace mongo {
* deletion, otherwise the document will be lost if the process gets terminated in between.
*/
class RemoveSaver {
- MONGO_DISALLOW_COPYING(RemoveSaver);
+ RemoveSaver(const RemoveSaver&) = delete;
+ RemoveSaver& operator=(const RemoveSaver&) = delete;
public:
RemoveSaver(const std::string& type, const std::string& ns, const std::string& why);
diff --git a/src/mongo/db/storage/storage_engine_lock_file.h b/src/mongo/db/storage/storage_engine_lock_file.h
index 983b3fa6ab8..14a576aab01 100644
--- a/src/mongo/db/storage/storage_engine_lock_file.h
+++ b/src/mongo/db/storage/storage_engine_lock_file.h
@@ -33,7 +33,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/service_context.h"
@@ -42,7 +41,8 @@ namespace mongo {
constexpr StringData kLockFileBasename = "mongod.lock"_sd;
class StorageEngineLockFile {
- MONGO_DISALLOW_COPYING(StorageEngineLockFile);
+ StorageEngineLockFile(const StorageEngineLockFile&) = delete;
+ StorageEngineLockFile& operator=(const StorageEngineLockFile&) = delete;
public:
static boost::optional<StorageEngineLockFile>& get(ServiceContext* service);
diff --git a/src/mongo/db/storage/storage_engine_metadata.h b/src/mongo/db/storage/storage_engine_metadata.h
index 188d9365107..e38a6df46ab 100644
--- a/src/mongo/db/storage/storage_engine_metadata.h
+++ b/src/mongo/db/storage/storage_engine_metadata.h
@@ -34,7 +34,6 @@
#include <memory>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/db/jsobj.h"
@@ -47,7 +46,8 @@ namespace mongo {
* Fields other than 'storage.engine' are ignored.
*/
class StorageEngineMetadata {
- MONGO_DISALLOW_COPYING(StorageEngineMetadata);
+ StorageEngineMetadata(const StorageEngineMetadata&) = delete;
+ StorageEngineMetadata& operator=(const StorageEngineMetadata&) = delete;
public:
/**
diff --git a/src/mongo/db/storage/storage_repair_observer.h b/src/mongo/db/storage/storage_repair_observer.h
index bbb0852747f..6f5a89c4751 100644
--- a/src/mongo/db/storage/storage_repair_observer.h
+++ b/src/mongo/db/storage/storage_repair_observer.h
@@ -33,7 +33,6 @@
#include <boost/filesystem.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/service_context.h"
namespace mongo {
@@ -45,7 +44,8 @@ namespace mongo {
* */
class StorageRepairObserver {
public:
- MONGO_DISALLOW_COPYING(StorageRepairObserver);
+ StorageRepairObserver(const StorageRepairObserver&) = delete;
+ StorageRepairObserver& operator=(const StorageRepairObserver&) = delete;
explicit StorageRepairObserver(const std::string& dbpath);
~StorageRepairObserver() = default;
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h
index e7066b09965..f71ba7e5214 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_oplog_manager.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_record_store.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
@@ -45,7 +44,8 @@ class WiredTigerSessionCache;
// Manages oplog visibility, by periodically querying WiredTiger's all_committed timestamp value and
// then using that timestamp for all transactions that read the oplog collection.
class WiredTigerOplogManager {
- MONGO_DISALLOW_COPYING(WiredTigerOplogManager);
+ WiredTigerOplogManager(const WiredTigerOplogManager&) = delete;
+ WiredTigerOplogManager& operator=(const WiredTigerOplogManager&) = delete;
public:
WiredTigerOplogManager() {}
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.h b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.h
index 046256cff1f..9ff2b87497f 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_snapshot_manager.h
@@ -32,7 +32,6 @@
#include <boost/optional.hpp>
#include <wiredtiger.h>
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/timestamp.h"
#include "mongo/db/storage/snapshot_manager.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_begin_transaction_block.h"
@@ -43,7 +42,8 @@ namespace mongo {
class WiredTigerOplogManager;
class WiredTigerSnapshotManager final : public SnapshotManager {
- MONGO_DISALLOW_COPYING(WiredTigerSnapshotManager);
+ WiredTigerSnapshotManager(const WiredTigerSnapshotManager&) = delete;
+ WiredTigerSnapshotManager& operator=(const WiredTigerSnapshotManager&) = delete;
public:
WiredTigerSnapshotManager() = default;
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_util.h b/src/mongo/db/storage/wiredtiger/wiredtiger_util.h
index 3a7fb134b50..23015814cf7 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_util.h
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_util.h
@@ -32,7 +32,6 @@
#include <limits>
#include <wiredtiger.h>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
#include "mongo/base/status_with.h"
#include "mongo/bson/bsonobj.h"
@@ -123,7 +122,8 @@ private:
};
class WiredTigerUtil {
- MONGO_DISALLOW_COPYING(WiredTigerUtil);
+ WiredTigerUtil(const WiredTigerUtil&) = delete;
+ WiredTigerUtil& operator=(const WiredTigerUtil&) = delete;
private:
WiredTigerUtil();
@@ -287,7 +287,8 @@ private:
};
class WiredTigerConfigParser {
- MONGO_DISALLOW_COPYING(WiredTigerConfigParser);
+ WiredTigerConfigParser(const WiredTigerConfigParser&) = delete;
+ WiredTigerConfigParser& operator=(const WiredTigerConfigParser&) = delete;
public:
WiredTigerConfigParser(StringData config) {
diff --git a/src/mongo/db/storage/write_unit_of_work.h b/src/mongo/db/storage/write_unit_of_work.h
index 3830aa37286..297d1f65f6e 100644
--- a/src/mongo/db/storage/write_unit_of_work.h
+++ b/src/mongo/db/storage/write_unit_of_work.h
@@ -31,7 +31,6 @@
#include <memory>
-#include "mongo/base/disallow_copying.h"
namespace mongo {
@@ -48,7 +47,8 @@ class OperationContext;
* also abort.
*/
class WriteUnitOfWork {
- MONGO_DISALLOW_COPYING(WriteUnitOfWork);
+ WriteUnitOfWork(const WriteUnitOfWork&) = delete;
+ WriteUnitOfWork& operator=(const WriteUnitOfWork&) = delete;
public:
/**
diff --git a/src/mongo/db/transaction_participant.h b/src/mongo/db/transaction_participant.h
index 974e0e2fa6b..b4d07a1a23e 100644
--- a/src/mongo/db/transaction_participant.h
+++ b/src/mongo/db/transaction_participant.h
@@ -33,7 +33,6 @@
#include <iostream>
#include <map>
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/commands/txn_cmds_gen.h"
#include "mongo/db/concurrency/locker.h"
#include "mongo/db/logical_session_id.h"
@@ -91,7 +90,8 @@ enum class TerminationCause {
* the comments below for more information.
*/
class TransactionParticipant {
- MONGO_DISALLOW_COPYING(TransactionParticipant);
+ TransactionParticipant(const TransactionParticipant&) = delete;
+ TransactionParticipant& operator=(const TransactionParticipant&) = delete;
struct PrivateState;
struct ObservableState;
diff --git a/src/mongo/db/views/view_catalog.h b/src/mongo/db/views/view_catalog.h
index b2d13f97a26..08ed7c72422 100644
--- a/src/mongo/db/views/view_catalog.h
+++ b/src/mongo/db/views/view_catalog.h
@@ -60,7 +60,8 @@ class Database;
* views catalog collection if necessary, throwing if the refresh fails.
*/
class ViewCatalog {
- MONGO_DISALLOW_COPYING(ViewCatalog);
+ ViewCatalog(const ViewCatalog&) = delete;
+ ViewCatalog& operator=(const ViewCatalog&) = delete;
public:
using ViewMap = StringMap<std::shared_ptr<ViewDefinition>>;
diff --git a/src/mongo/db/views/view_graph.h b/src/mongo/db/views/view_graph.h
index 1315a928794..cddc0d20c50 100644
--- a/src/mongo/db/views/view_graph.h
+++ b/src/mongo/db/views/view_graph.h
@@ -50,7 +50,8 @@ class ViewDefinition;
* This is owned and managed by the ViewCatalog.
*/
class ViewGraph {
- MONGO_DISALLOW_COPYING(ViewGraph);
+ ViewGraph(const ViewGraph&) = delete;
+ ViewGraph& operator=(const ViewGraph&) = delete;
public:
static const int kMaxViewDepth;
diff --git a/src/mongo/db/wire_version.h b/src/mongo/db/wire_version.h
index ec55f9478aa..8ecb08fd7dd 100644
--- a/src/mongo/db/wire_version.h
+++ b/src/mongo/db/wire_version.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/bsonobjbuilder.h"
namespace mongo {
@@ -91,7 +90,8 @@ struct WireVersionInfo {
};
struct WireSpec {
- MONGO_DISALLOW_COPYING(WireSpec);
+ WireSpec(const WireSpec&) = delete;
+ WireSpec& operator=(const WireSpec&) = delete;
static WireSpec& instance();