diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-03-27 12:21:37 -0400 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2019-03-28 10:13:21 -0400 |
commit | f922827d45ce752e148185dfa3a785f7c9cf29fd (patch) | |
tree | b3ae7fdba18d9ef3384af6e0d009d091e5df14a3 /src/mongo/s | |
parent | f2f422d92b639edba0a10d40a43803723cb15baf (diff) | |
download | mongo-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/s')
34 files changed, 70 insertions, 59 deletions
diff --git a/src/mongo/s/async_requests_sender.h b/src/mongo/s/async_requests_sender.h index 81c13cf2135..bfd06834972 100644 --- a/src/mongo/s/async_requests_sender.h +++ b/src/mongo/s/async_requests_sender.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/client/read_preference.h" @@ -81,7 +80,8 @@ namespace mongo { * Does not throw exceptions. */ class AsyncRequestsSender { - MONGO_DISALLOW_COPYING(AsyncRequestsSender); + AsyncRequestsSender(const AsyncRequestsSender&) = delete; + AsyncRequestsSender& operator=(const AsyncRequestsSender&) = delete; public: /** diff --git a/src/mongo/s/balancer_configuration.h b/src/mongo/s/balancer_configuration.h index f6f81006968..c62d91a380d 100644 --- a/src/mongo/s/balancer_configuration.h +++ b/src/mongo/s/balancer_configuration.h @@ -33,7 +33,6 @@ #include <boost/optional.hpp> #include <cstdint> -#include "mongo/base/disallow_copying.h" #include "mongo/platform/atomic_word.h" #include "mongo/s/request_types/migration_secondary_throttle_options.h" #include "mongo/stdx/mutex.h" @@ -196,7 +195,8 @@ private: * Contains settings, which control the behaviour of the balancer. */ class BalancerConfiguration { - MONGO_DISALLOW_COPYING(BalancerConfiguration); + BalancerConfiguration(const BalancerConfiguration&) = delete; + BalancerConfiguration& operator=(const BalancerConfiguration&) = delete; public: /** diff --git a/src/mongo/s/catalog/dist_lock_catalog.h b/src/mongo/s/catalog/dist_lock_catalog.h index a3d596b26ac..7f774915b66 100644 --- a/src/mongo/s/catalog/dist_lock_catalog.h +++ b/src/mongo/s/catalog/dist_lock_catalog.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/bson/oid.h" #include "mongo/db/write_concern_options.h" @@ -48,7 +47,8 @@ class StatusWith; * Interface for the distributed lock operations. */ class DistLockCatalog { - MONGO_DISALLOW_COPYING(DistLockCatalog); + DistLockCatalog(const DistLockCatalog&) = delete; + DistLockCatalog& operator=(const DistLockCatalog&) = delete; public: static const WriteConcernOptions kLocalWriteConcern; diff --git a/src/mongo/s/catalog/dist_lock_manager.h b/src/mongo/s/catalog/dist_lock_manager.h index 58941efeb1c..97a63a8f096 100644 --- a/src/mongo/s/catalog/dist_lock_manager.h +++ b/src/mongo/s/catalog/dist_lock_manager.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/bson/oid.h" #include "mongo/stdx/chrono.h" @@ -74,7 +73,8 @@ public: * RAII type for distributed lock. Not meant to be shared across multiple threads. */ class ScopedDistLock { - MONGO_DISALLOW_COPYING(ScopedDistLock); + ScopedDistLock(const ScopedDistLock&) = delete; + ScopedDistLock& operator=(const ScopedDistLock&) = delete; public: ScopedDistLock(OperationContext* opCtx, diff --git a/src/mongo/s/catalog/sharding_catalog_client.h b/src/mongo/s/catalog/sharding_catalog_client.h index 84b541198f2..cb16b5d26f9 100644 --- a/src/mongo/s/catalog/sharding_catalog_client.h +++ b/src/mongo/s/catalog/sharding_catalog_client.h @@ -34,7 +34,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/db/keys_collection_document.h" #include "mongo/db/repl/optime_with.h" #include "mongo/db/write_concern_options.h" @@ -83,7 +82,8 @@ struct ConnectionPoolStats; * move to be run on the config server primary. */ class ShardingCatalogClient { - MONGO_DISALLOW_COPYING(ShardingCatalogClient); + ShardingCatalogClient(const ShardingCatalogClient&) = delete; + ShardingCatalogClient& operator=(const ShardingCatalogClient&) = delete; // Allows ShardingCatalogManager to access _exhaustiveFindOnConfig friend class ShardingCatalogManager; diff --git a/src/mongo/s/catalog_cache.h b/src/mongo/s/catalog_cache.h index b2032e2d44a..e2d67ff68cd 100644 --- a/src/mongo/s/catalog_cache.h +++ b/src/mongo/s/catalog_cache.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/platform/atomic_word.h" #include "mongo/s/catalog/type_database.h" @@ -118,7 +117,8 @@ private: * writes happen through the ShardingCatalogManager and the cache hierarchy needs to be invalidated. */ class CatalogCache { - MONGO_DISALLOW_COPYING(CatalogCache); + CatalogCache(const CatalogCache&) = delete; + CatalogCache& operator=(const CatalogCache&) = delete; public: CatalogCache(CatalogCacheLoader& cacheLoader); diff --git a/src/mongo/s/catalog_cache_loader.h b/src/mongo/s/catalog_cache_loader.h index a0a8857dc68..cb00ae17bac 100644 --- a/src/mongo/s/catalog_cache_loader.h +++ b/src/mongo/s/catalog_cache_loader.h @@ -31,7 +31,6 @@ #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/base/string_data.h" #include "mongo/s/catalog/type_chunk.h" diff --git a/src/mongo/s/chunk_manager.h b/src/mongo/s/chunk_manager.h index 8277adc3bff..8544eccf878 100644 --- a/src/mongo/s/chunk_manager.h +++ b/src/mongo/s/chunk_manager.h @@ -34,7 +34,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/db/namespace_string.h" #include "mongo/db/query/collation/collator_interface.h" #include "mongo/s/chunk.h" @@ -61,7 +60,8 @@ using ShardVersionMap = std::map<ShardId, ChunkVersion>; * in time. */ class RoutingTableHistory : public std::enable_shared_from_this<RoutingTableHistory> { - MONGO_DISALLOW_COPYING(RoutingTableHistory); + RoutingTableHistory(const RoutingTableHistory&) = delete; + RoutingTableHistory& operator=(const RoutingTableHistory&) = delete; public: /** @@ -204,7 +204,8 @@ private: // This will be renamed to RoutingTableHistory and the original RoutingTableHistory will be // ChunkHistoryMap class ChunkManager : public std::enable_shared_from_this<ChunkManager> { - MONGO_DISALLOW_COPYING(ChunkManager); + ChunkManager(const ChunkManager&) = delete; + ChunkManager& operator=(const ChunkManager&) = delete; public: class ConstChunkIterator { diff --git a/src/mongo/s/chunk_writes_tracker.h b/src/mongo/s/chunk_writes_tracker.h index df847bcfc39..141879375c4 100644 --- a/src/mongo/s/chunk_writes_tracker.h +++ b/src/mongo/s/chunk_writes_tracker.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/platform/atomic_word.h" #include "mongo/stdx/mutex.h" diff --git a/src/mongo/s/client/rs_local_client.h b/src/mongo/s/client/rs_local_client.h index d12b443b868..7bba5c7eaa0 100644 --- a/src/mongo/s/client/rs_local_client.h +++ b/src/mongo/s/client/rs_local_client.h @@ -29,7 +29,6 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/db/repl/optime.h" #include "mongo/s/client/shard.h" #include "mongo/stdx/mutex.h" @@ -41,7 +40,8 @@ namespace mongo { * in the scenarios where causal consistency is not available yet. */ class RSLocalClient { - MONGO_DISALLOW_COPYING(RSLocalClient); + RSLocalClient(const RSLocalClient&) = delete; + RSLocalClient& operator=(const RSLocalClient&) = delete; public: explicit RSLocalClient() = default; diff --git a/src/mongo/s/client/shard_connection.cpp b/src/mongo/s/client/shard_connection.cpp index 710248cc611..5ac9fe97bd0 100644 --- a/src/mongo/s/client/shard_connection.cpp +++ b/src/mongo/s/client/shard_connection.cpp @@ -85,7 +85,8 @@ private: * to be thread safe. */ class ClientConnections { - MONGO_DISALLOW_COPYING(ClientConnections); + ClientConnections(const ClientConnections&) = delete; + ClientConnections& operator=(const ClientConnections&) = delete; public: struct Status { diff --git a/src/mongo/s/client/shard_factory.h b/src/mongo/s/client/shard_factory.h index f55bc90a751..c830a470fda 100644 --- a/src/mongo/s/client/shard_factory.h +++ b/src/mongo/s/client/shard_factory.h @@ -34,7 +34,6 @@ #include <memory> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/client/connection_string.h" #include "mongo/client/remote_command_targeter_factory.h" @@ -47,7 +46,8 @@ namespace mongo { * An object factory for creating Shard instances via calling registered builders. */ class ShardFactory { - MONGO_DISALLOW_COPYING(ShardFactory); + ShardFactory(const ShardFactory&) = delete; + ShardFactory& operator=(const ShardFactory&) = delete; public: using BuilderCallable = diff --git a/src/mongo/s/client/shard_local.h b/src/mongo/s/client/shard_local.h index 17b67378658..7a2ed6d1c78 100644 --- a/src/mongo/s/client/shard_local.h +++ b/src/mongo/s/client/shard_local.h @@ -29,14 +29,14 @@ #pragma once -#include "mongo/base/disallow_copying.h" #include "mongo/s/client/rs_local_client.h" #include "mongo/s/client/shard.h" namespace mongo { class ShardLocal : public Shard { - MONGO_DISALLOW_COPYING(ShardLocal); + ShardLocal(const ShardLocal&) = delete; + ShardLocal& operator=(const ShardLocal&) = delete; public: explicit ShardLocal(const ShardId& id); diff --git a/src/mongo/s/client/shard_registry.h b/src/mongo/s/client/shard_registry.h index df119bfeeb2..87ad1cc0523 100644 --- a/src/mongo/s/client/shard_registry.h +++ b/src/mongo/s/client/shard_registry.h @@ -34,7 +34,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/db/jsobj.h" #include "mongo/executor/task_executor.h" #include "mongo/s/client/shard.h" @@ -138,7 +137,8 @@ private: * errors automatically as well. */ class ShardRegistry { - MONGO_DISALLOW_COPYING(ShardRegistry); + ShardRegistry(const ShardRegistry&) = delete; + ShardRegistry& operator=(const ShardRegistry&) = delete; public: /** diff --git a/src/mongo/s/client/shard_remote.h b/src/mongo/s/client/shard_remote.h index b5d9b4a7c2e..e58ec0a8809 100644 --- a/src/mongo/s/client/shard_remote.h +++ b/src/mongo/s/client/shard_remote.h @@ -33,7 +33,6 @@ #include "mongo/s/client/shard.h" -#include "mongo/base/disallow_copying.h" #include "mongo/executor/task_executor.h" #include "mongo/stdx/mutex.h" @@ -44,7 +43,8 @@ namespace mongo { * the shard (if replica set). */ class ShardRemote : public Shard { - MONGO_DISALLOW_COPYING(ShardRemote); + ShardRemote(const ShardRemote&) = delete; + ShardRemote& operator=(const ShardRemote&) = delete; public: /** diff --git a/src/mongo/s/cluster_identity_loader.h b/src/mongo/s/cluster_identity_loader.h index dbbf086d71e..b5ee563d253 100644 --- a/src/mongo/s/cluster_identity_loader.h +++ b/src/mongo/s/cluster_identity_loader.h @@ -31,7 +31,6 @@ #include <boost/optional.hpp> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/oid.h" #include "mongo/db/repl/read_concern_args.h" #include "mongo/stdx/condition_variable.h" @@ -48,7 +47,8 @@ class StatusWith; * Decoration on ServiceContext used by any process in a sharded cluster to access the cluster ID. */ class ClusterIdentityLoader { - MONGO_DISALLOW_COPYING(ClusterIdentityLoader); + ClusterIdentityLoader(const ClusterIdentityLoader&) = delete; + ClusterIdentityLoader& operator=(const ClusterIdentityLoader&) = delete; public: ClusterIdentityLoader() = default; diff --git a/src/mongo/s/commands/cluster_current_op.cpp b/src/mongo/s/commands/cluster_current_op.cpp index 8108201bcb0..2d72bd1f96d 100644 --- a/src/mongo/s/commands/cluster_current_op.cpp +++ b/src/mongo/s/commands/cluster_current_op.cpp @@ -44,7 +44,8 @@ namespace mongo { namespace { class ClusterCurrentOpCommand final : public CurrentOpCommandBase { - MONGO_DISALLOW_COPYING(ClusterCurrentOpCommand); + ClusterCurrentOpCommand(const ClusterCurrentOpCommand&) = delete; + ClusterCurrentOpCommand& operator=(const ClusterCurrentOpCommand&) = delete; public: ClusterCurrentOpCommand() = default; diff --git a/src/mongo/s/commands/cluster_index_filter_cmd.cpp b/src/mongo/s/commands/cluster_index_filter_cmd.cpp index 158ebaa9e91..57de3734343 100644 --- a/src/mongo/s/commands/cluster_index_filter_cmd.cpp +++ b/src/mongo/s/commands/cluster_index_filter_cmd.cpp @@ -43,7 +43,8 @@ namespace { * than forwarding the commands to all shards and combining the results. */ class ClusterIndexFilterCmd : public BasicCommand { - MONGO_DISALLOW_COPYING(ClusterIndexFilterCmd); + ClusterIndexFilterCmd(const ClusterIndexFilterCmd&) = delete; + ClusterIndexFilterCmd& operator=(const ClusterIndexFilterCmd&) = delete; public: /** diff --git a/src/mongo/s/commands/cluster_plan_cache_cmd.cpp b/src/mongo/s/commands/cluster_plan_cache_cmd.cpp index 55f7de06db8..79a77f5b956 100644 --- a/src/mongo/s/commands/cluster_plan_cache_cmd.cpp +++ b/src/mongo/s/commands/cluster_plan_cache_cmd.cpp @@ -50,7 +50,8 @@ using std::vector; * forwarding the commands to all shards and combining the results. */ class ClusterPlanCacheCmd : public BasicCommand { - MONGO_DISALLOW_COPYING(ClusterPlanCacheCmd); + ClusterPlanCacheCmd(const ClusterPlanCacheCmd&) = delete; + ClusterPlanCacheCmd& operator=(const ClusterPlanCacheCmd&) = delete; public: virtual ~ClusterPlanCacheCmd() {} diff --git a/src/mongo/s/query/async_results_merger.h b/src/mongo/s/query/async_results_merger.h index 889a0bb5d7f..92cf05e66f5 100644 --- a/src/mongo/s/query/async_results_merger.h +++ b/src/mongo/s/query/async_results_merger.h @@ -33,7 +33,6 @@ #include <queue> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/cursor_id.h" @@ -73,7 +72,8 @@ class CursorResponse; * Does not throw exceptions. */ class AsyncResultsMerger { - MONGO_DISALLOW_COPYING(AsyncResultsMerger); + AsyncResultsMerger(const AsyncResultsMerger&) = delete; + AsyncResultsMerger& operator=(const AsyncResultsMerger&) = delete; public: // When mongos has to do a merge in order to return results to the client in the correct sort diff --git a/src/mongo/s/query/cluster_client_cursor_impl.h b/src/mongo/s/query/cluster_client_cursor_impl.h index b6374ff4f33..50d36853cf8 100644 --- a/src/mongo/s/query/cluster_client_cursor_impl.h +++ b/src/mongo/s/query/cluster_client_cursor_impl.h @@ -48,7 +48,8 @@ class RouterStageMock; * released. */ class ClusterClientCursorGuard final { - MONGO_DISALLOW_COPYING(ClusterClientCursorGuard); + ClusterClientCursorGuard(const ClusterClientCursorGuard&) = delete; + ClusterClientCursorGuard& operator=(const ClusterClientCursorGuard&) = delete; public: ClusterClientCursorGuard(OperationContext* opCtx, std::unique_ptr<ClusterClientCursor> ccc); @@ -80,7 +81,8 @@ private: }; class ClusterClientCursorImpl final : public ClusterClientCursor { - MONGO_DISALLOW_COPYING(ClusterClientCursorImpl); + ClusterClientCursorImpl(const ClusterClientCursorImpl&) = delete; + ClusterClientCursorImpl& operator=(const ClusterClientCursorImpl&) = delete; public: /** diff --git a/src/mongo/s/query/cluster_client_cursor_mock.h b/src/mongo/s/query/cluster_client_cursor_mock.h index 6dd23c81553..f99d2e77b94 100644 --- a/src/mongo/s/query/cluster_client_cursor_mock.h +++ b/src/mongo/s/query/cluster_client_cursor_mock.h @@ -40,7 +40,8 @@ namespace mongo { class ClusterClientCursorMock final : public ClusterClientCursor { - MONGO_DISALLOW_COPYING(ClusterClientCursorMock); + ClusterClientCursorMock(const ClusterClientCursorMock&) = delete; + ClusterClientCursorMock& operator=(const ClusterClientCursorMock&) = delete; public: ClusterClientCursorMock(boost::optional<LogicalSessionId> lsid, diff --git a/src/mongo/s/query/cluster_cursor_manager.h b/src/mongo/s/query/cluster_cursor_manager.h index fa129d26d02..3d0afe5db94 100644 --- a/src/mongo/s/query/cluster_cursor_manager.h +++ b/src/mongo/s/query/cluster_cursor_manager.h @@ -70,7 +70,8 @@ class StatusWith; * No public methods throw exceptions, and all public methods are thread-safe. */ class ClusterCursorManager { - MONGO_DISALLOW_COPYING(ClusterCursorManager); + ClusterCursorManager(const ClusterCursorManager&) = delete; + ClusterCursorManager& operator=(const ClusterCursorManager&) = delete; public: // @@ -131,7 +132,8 @@ public: * current OperationContext, and return the cursor. */ class PinnedCursor { - MONGO_DISALLOW_COPYING(PinnedCursor); + PinnedCursor(const PinnedCursor&) = delete; + PinnedCursor& operator=(const PinnedCursor&) = delete; public: /** @@ -550,7 +552,8 @@ private: * CursorEntry is a moveable, non-copyable container for a single cursor. */ class CursorEntry { - MONGO_DISALLOW_COPYING(CursorEntry); + CursorEntry(const CursorEntry&) = delete; + CursorEntry& operator=(const CursorEntry&) = delete; public: CursorEntry() = default; @@ -661,7 +664,8 @@ private: * contained cursors share the same 32-bit prefix of their cursor id. */ struct CursorEntryContainer { - MONGO_DISALLOW_COPYING(CursorEntryContainer); + CursorEntryContainer(const CursorEntryContainer&) = delete; + CursorEntryContainer& operator=(const CursorEntryContainer&) = delete; CursorEntryContainer(uint32_t containerPrefix) : containerPrefix(containerPrefix) {} diff --git a/src/mongo/s/query/establish_cursors.h b/src/mongo/s/query/establish_cursors.h index b75a62eba9b..be7eac8d869 100644 --- a/src/mongo/s/query/establish_cursors.h +++ b/src/mongo/s/query/establish_cursors.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/cursor_id.h" diff --git a/src/mongo/s/query/owned_remote_cursor.h b/src/mongo/s/query/owned_remote_cursor.h index 540e2173abc..473196e4de5 100644 --- a/src/mongo/s/query/owned_remote_cursor.h +++ b/src/mongo/s/query/owned_remote_cursor.h @@ -42,7 +42,8 @@ namespace mongo { */ class OwnedRemoteCursor { public: - MONGO_DISALLOW_COPYING(OwnedRemoteCursor); + OwnedRemoteCursor(const OwnedRemoteCursor&) = delete; + OwnedRemoteCursor& operator=(const OwnedRemoteCursor&) = delete; OwnedRemoteCursor(OperationContext* opCtx, RemoteCursor&& cursor, NamespaceString nss) : _opCtx(opCtx), _remoteCursor(std::move(cursor)), _nss(std::move(nss)) {} diff --git a/src/mongo/s/service_entry_point_mongos.h b/src/mongo/s/service_entry_point_mongos.h index a6d8e03963c..085b5991d5c 100644 --- a/src/mongo/s/service_entry_point_mongos.h +++ b/src/mongo/s/service_entry_point_mongos.h @@ -31,7 +31,6 @@ #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/transport/service_entry_point_impl.h" namespace mongo { @@ -40,7 +39,8 @@ namespace mongo { * The entry point from the TransportLayer into Mongos. */ class ServiceEntryPointMongos final : public ServiceEntryPointImpl { - MONGO_DISALLOW_COPYING(ServiceEntryPointMongos); + ServiceEntryPointMongos(const ServiceEntryPointMongos&) = delete; + ServiceEntryPointMongos& operator=(const ServiceEntryPointMongos&) = delete; public: using ServiceEntryPointImpl::ServiceEntryPointImpl; diff --git a/src/mongo/s/session_catalog_router.h b/src/mongo/s/session_catalog_router.h index ca2b662a13a..10ddcc51ede 100644 --- a/src/mongo/s/session_catalog_router.h +++ b/src/mongo/s/session_catalog_router.h @@ -39,7 +39,8 @@ namespace mongo { * at destruction. This can only be used for multi-statement transactions. */ class RouterOperationContextSession { - MONGO_DISALLOW_COPYING(RouterOperationContextSession); + RouterOperationContextSession(const RouterOperationContextSession&) = delete; + RouterOperationContextSession& operator=(const RouterOperationContextSession&) = delete; public: RouterOperationContextSession(OperationContext* opCtx); diff --git a/src/mongo/s/sharding_task_executor.cpp b/src/mongo/s/sharding_task_executor.cpp index 70bba12918f..1f723c2b1d5 100644 --- a/src/mongo/s/sharding_task_executor.cpp +++ b/src/mongo/s/sharding_task_executor.cpp @@ -33,7 +33,6 @@ #include "mongo/s/sharding_task_executor.h" -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/bson/timestamp.h" #include "mongo/db/logical_time.h" diff --git a/src/mongo/s/sharding_task_executor.h b/src/mongo/s/sharding_task_executor.h index 1c4d9ed3104..b9d879070c6 100644 --- a/src/mongo/s/sharding_task_executor.h +++ b/src/mongo/s/sharding_task_executor.h @@ -31,7 +31,6 @@ #include <memory> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/executor/task_executor.h" #include "mongo/stdx/condition_variable.h" @@ -49,7 +48,8 @@ class ThreadPoolTaskExecutor; * override methods if needed. */ class ShardingTaskExecutor final : public TaskExecutor { - MONGO_DISALLOW_COPYING(ShardingTaskExecutor); + ShardingTaskExecutor(const ShardingTaskExecutor&) = delete; + ShardingTaskExecutor& operator=(const ShardingTaskExecutor&) = delete; public: ShardingTaskExecutor(std::unique_ptr<ThreadPoolTaskExecutor> executor); diff --git a/src/mongo/s/sharding_uptime_reporter.h b/src/mongo/s/sharding_uptime_reporter.h index 98fa36693b2..8cbdcec0c32 100644 --- a/src/mongo/s/sharding_uptime_reporter.h +++ b/src/mongo/s/sharding_uptime_reporter.h @@ -31,7 +31,6 @@ #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/stdx/thread.h" #include "mongo/util/timer.h" @@ -46,7 +45,8 @@ class OperationContext; * NOTE: Not thread-safe, so it should not be used from more than one thread at a time. */ class ShardingUptimeReporter { - MONGO_DISALLOW_COPYING(ShardingUptimeReporter); + ShardingUptimeReporter(const ShardingUptimeReporter&) = delete; + ShardingUptimeReporter& operator=(const ShardingUptimeReporter&) = delete; public: ShardingUptimeReporter(); diff --git a/src/mongo/s/transaction_router.h b/src/mongo/s/transaction_router.h index b096971b1e9..5f248029551 100644 --- a/src/mongo/s/transaction_router.h +++ b/src/mongo/s/transaction_router.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <map> -#include "mongo/base/disallow_copying.h" #include "mongo/db/commands/txn_cmds_gen.h" #include "mongo/db/logical_session_id.h" #include "mongo/db/operation_context.h" diff --git a/src/mongo/s/write_ops/batch_write_op.h b/src/mongo/s/write_ops/batch_write_op.h index a0ce02117dc..894c184aa52 100644 --- a/src/mongo/s/write_ops/batch_write_op.h +++ b/src/mongo/s/write_ops/batch_write_op.h @@ -33,7 +33,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/logical_session_id.h" @@ -116,7 +115,8 @@ using TargetedBatchMap = std::map<const ShardEndpoint*, TargetedWriteBatch*, End * */ class BatchWriteOp { - MONGO_DISALLOW_COPYING(BatchWriteOp); + BatchWriteOp(const BatchWriteOp&) = delete; + BatchWriteOp& operator=(const BatchWriteOp&) = delete; public: BatchWriteOp(OperationContext* opCtx, const BatchedCommandRequest& clientRequest); @@ -244,7 +244,8 @@ private: * efficiently be registered for reporting. */ class TargetedWriteBatch { - MONGO_DISALLOW_COPYING(TargetedWriteBatch); + TargetedWriteBatch(const TargetedWriteBatch&) = delete; + TargetedWriteBatch& operator=(const TargetedWriteBatch&) = delete; public: TargetedWriteBatch(const ShardEndpoint& endpoint) : _endpoint(endpoint) {} diff --git a/src/mongo/s/write_ops/batched_command_response.h b/src/mongo/s/write_ops/batched_command_response.h index e1a5b7e5a42..f5022320ab6 100644 --- a/src/mongo/s/write_ops/batched_command_response.h +++ b/src/mongo/s/write_ops/batched_command_response.h @@ -32,7 +32,6 @@ #include <string> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/db/jsobj.h" #include "mongo/db/repl/optime.h" @@ -47,7 +46,8 @@ namespace mongo { * the response side. */ class BatchedCommandResponse { - MONGO_DISALLOW_COPYING(BatchedCommandResponse); + BatchedCommandResponse(const BatchedCommandResponse&) = delete; + BatchedCommandResponse& operator=(const BatchedCommandResponse&) = delete; public: // diff --git a/src/mongo/s/write_ops/batched_upsert_detail.h b/src/mongo/s/write_ops/batched_upsert_detail.h index 6226c581b60..c4eb49868f9 100644 --- a/src/mongo/s/write_ops/batched_upsert_detail.h +++ b/src/mongo/s/write_ops/batched_upsert_detail.h @@ -40,7 +40,8 @@ namespace mongo { * of a write command's response (see batched_command_response.h) */ class BatchedUpsertDetail { - MONGO_DISALLOW_COPYING(BatchedUpsertDetail); + BatchedUpsertDetail(const BatchedUpsertDetail&) = delete; + BatchedUpsertDetail& operator=(const BatchedUpsertDetail&) = delete; public: // |