summaryrefslogtreecommitdiff
path: root/src/mongo/util
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/util
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/util')
-rw-r--r--src/mongo/util/background.h4
-rw-r--r--src/mongo/util/background_thread_clock_source.h4
-rw-r--r--src/mongo/util/bufreader.h4
-rw-r--r--src/mongo/util/concurrency/idle_thread_block.h4
-rw-r--r--src/mongo/util/concurrency/mutex.h7
-rw-r--r--src/mongo/util/concurrency/spin_lock.h10
-rw-r--r--src/mongo/util/concurrency/thread_pool.h4
-rw-r--r--src/mongo/util/concurrency/thread_pool_interface.h4
-rw-r--r--src/mongo/util/concurrency/thread_pool_test_common.cpp6
-rw-r--r--src/mongo/util/concurrency/ticketholder.h7
-rw-r--r--src/mongo/util/decoration_registry.h4
-rw-r--r--src/mongo/util/fail_point.h7
-rw-r--r--src/mongo/util/heap_profiler.cpp3
-rw-r--r--src/mongo/util/intrusive_counter.h4
-rw-r--r--src/mongo/util/itoa.h4
-rw-r--r--src/mongo/util/lru_cache.h4
-rw-r--r--src/mongo/util/net/sock.h4
-rw-r--r--src/mongo/util/net/ssl_manager.h1
-rw-r--r--src/mongo/util/perfctr_collect.h7
-rw-r--r--src/mongo/util/periodic_runner.h1
-rw-r--r--src/mongo/util/periodic_runner_impl.h3
-rw-r--r--src/mongo/util/progress_meter.h6
-rw-r--r--src/mongo/util/queue.h4
-rw-r--r--src/mongo/util/signal_handlers_synchronous.cpp7
-rw-r--r--src/mongo/util/stacktrace_windows.cpp4
-rw-r--r--src/mongo/util/tcmalloc_set_parameter.cpp1
-rw-r--r--src/mongo/util/text.h4
-rw-r--r--src/mongo/util/thread_safe_string.h4
-rw-r--r--src/mongo/util/version.h4
29 files changed, 70 insertions, 60 deletions
diff --git a/src/mongo/util/background.h b/src/mongo/util/background.h
index aab4099b483..81c5ecb07c4 100644
--- a/src/mongo/util/background.h
+++ b/src/mongo/util/background.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/status.h"
namespace mongo {
@@ -55,7 +54,8 @@ namespace mongo {
*/
class BackgroundJob {
- MONGO_DISALLOW_COPYING(BackgroundJob);
+ BackgroundJob(const BackgroundJob&) = delete;
+ BackgroundJob& operator=(const BackgroundJob&) = delete;
protected:
/**
diff --git a/src/mongo/util/background_thread_clock_source.h b/src/mongo/util/background_thread_clock_source.h
index a70b21028d8..4b2d13324c2 100644
--- a/src/mongo/util/background_thread_clock_source.h
+++ b/src/mongo/util/background_thread_clock_source.h
@@ -32,7 +32,6 @@
#include <chrono>
#include <thread>
-#include "mongo/base/disallow_copying.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/memory.h"
@@ -52,7 +51,8 @@ namespace mongo {
* sleeps for the background thread.
*/
class BackgroundThreadClockSource final : public ClockSource {
- MONGO_DISALLOW_COPYING(BackgroundThreadClockSource);
+ BackgroundThreadClockSource(const BackgroundThreadClockSource&) = delete;
+ BackgroundThreadClockSource& operator=(const BackgroundThreadClockSource&) = delete;
public:
BackgroundThreadClockSource(std::unique_ptr<ClockSource> clockSource, Milliseconds granularity);
diff --git a/src/mongo/util/bufreader.h b/src/mongo/util/bufreader.h
index ac070e0c70b..42ff79af60c 100644
--- a/src/mongo/util/bufreader.h
+++ b/src/mongo/util/bufreader.h
@@ -38,7 +38,6 @@
#include "mongo/base/data_range.h"
#include "mongo/base/data_range_cursor.h"
#include "mongo/base/data_type_terminated.h"
-#include "mongo/base/disallow_copying.h"
#include "mongo/bson/util/builder.h"
#include "mongo/platform/strnlen.h"
#include "mongo/util/assert_util.h"
@@ -50,7 +49,8 @@ namespace mongo {
buffer with which we are working.
*/
class BufReader {
- MONGO_DISALLOW_COPYING(BufReader);
+ BufReader(const BufReader&) = delete;
+ BufReader& operator=(const BufReader&) = delete;
public:
BufReader(const void* p, unsigned len)
diff --git a/src/mongo/util/concurrency/idle_thread_block.h b/src/mongo/util/concurrency/idle_thread_block.h
index a395012d30a..ae1fcb96ff2 100644
--- a/src/mongo/util/concurrency/idle_thread_block.h
+++ b/src/mongo/util/concurrency/idle_thread_block.h
@@ -31,7 +31,6 @@
#include <boost/preprocessor/stringize.hpp>
-#include "mongo/base/disallow_copying.h"
namespace mongo {
@@ -44,7 +43,8 @@ namespace mongo {
* idle.
*/
class IdleThreadBlock {
- MONGO_DISALLOW_COPYING(IdleThreadBlock);
+ IdleThreadBlock(const IdleThreadBlock&) = delete;
+ IdleThreadBlock& operator=(const IdleThreadBlock&) = delete;
public:
IdleThreadBlock(const char* location) {
diff --git a/src/mongo/util/concurrency/mutex.h b/src/mongo/util/concurrency/mutex.h
index 4e47c4e6df6..8674fe269a4 100644
--- a/src/mongo/util/concurrency/mutex.h
+++ b/src/mongo/util/concurrency/mutex.h
@@ -35,7 +35,6 @@
#include <pthread.h>
#endif
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/assert_util.h"
namespace mongo {
@@ -49,7 +48,8 @@ namespace mongo {
#if defined(_WIN32)
class SimpleMutex {
- MONGO_DISALLOW_COPYING(SimpleMutex);
+ SimpleMutex(const SimpleMutex&) = delete;
+ SimpleMutex& operator=(const SimpleMutex&) = delete;
public:
SimpleMutex() {
@@ -74,7 +74,8 @@ private:
#else
class SimpleMutex {
- MONGO_DISALLOW_COPYING(SimpleMutex);
+ SimpleMutex(const SimpleMutex&) = delete;
+ SimpleMutex& operator=(const SimpleMutex&) = delete;
public:
SimpleMutex() {
diff --git a/src/mongo/util/concurrency/spin_lock.h b/src/mongo/util/concurrency/spin_lock.h
index 38854fef457..7f237dc3175 100644
--- a/src/mongo/util/concurrency/spin_lock.h
+++ b/src/mongo/util/concurrency/spin_lock.h
@@ -35,7 +35,6 @@
#include <atomic>
#endif
-#include "mongo/base/disallow_copying.h"
#include "mongo/config.h"
#include "mongo/platform/compiler.h"
#include "mongo/stdx/mutex.h"
@@ -44,7 +43,8 @@ namespace mongo {
#if defined(_WIN32)
class SpinLock {
- MONGO_DISALLOW_COPYING(SpinLock);
+ SpinLock(const SpinLock&) = delete;
+ SpinLock& operator=(const SpinLock&) = delete;
public:
SpinLock() {
@@ -71,7 +71,8 @@ private:
#if MONGO_CONFIG_DEBUG_BUILD
class SpinLock {
- MONGO_DISALLOW_COPYING(SpinLock);
+ SpinLock(const SpinLock&) = delete;
+ SpinLock& operator=(const SpinLock&) = delete;
public:
SpinLock() = default;
@@ -91,7 +92,8 @@ private:
#else
class SpinLock {
- MONGO_DISALLOW_COPYING(SpinLock);
+ SpinLock(const SpinLock&) = delete;
+ SpinLock& operator=(const SpinLock&) = delete;
public:
SpinLock() = default;
diff --git a/src/mongo/util/concurrency/thread_pool.h b/src/mongo/util/concurrency/thread_pool.h
index b95956c4832..370de65056e 100644
--- a/src/mongo/util/concurrency/thread_pool.h
+++ b/src/mongo/util/concurrency/thread_pool.h
@@ -33,7 +33,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/mutex.h"
@@ -51,7 +50,8 @@ class Status;
* See the Options struct for information about how to configure an instance.
*/
class ThreadPool final : public ThreadPoolInterface {
- MONGO_DISALLOW_COPYING(ThreadPool);
+ ThreadPool(const ThreadPool&) = delete;
+ ThreadPool& operator=(const ThreadPool&) = delete;
public:
/**
diff --git a/src/mongo/util/concurrency/thread_pool_interface.h b/src/mongo/util/concurrency/thread_pool_interface.h
index dde15644cb2..847dfe0506b 100644
--- a/src/mongo/util/concurrency/thread_pool_interface.h
+++ b/src/mongo/util/concurrency/thread_pool_interface.h
@@ -29,7 +29,6 @@
#pragma once
-#include "mongo/base/disallow_copying.h"
#include "mongo/util/functional.h"
namespace mongo {
@@ -40,7 +39,8 @@ class Status;
* Interface for a thread pool.
*/
class ThreadPoolInterface {
- MONGO_DISALLOW_COPYING(ThreadPoolInterface);
+ ThreadPoolInterface(const ThreadPoolInterface&) = delete;
+ ThreadPoolInterface& operator=(const ThreadPoolInterface&) = delete;
public:
using Task = unique_function<void()>;
diff --git a/src/mongo/util/concurrency/thread_pool_test_common.cpp b/src/mongo/util/concurrency/thread_pool_test_common.cpp
index 5df135ac19c..a03da59cd49 100644
--- a/src/mongo/util/concurrency/thread_pool_test_common.cpp
+++ b/src/mongo/util/concurrency/thread_pool_test_common.cpp
@@ -70,7 +70,8 @@ static ThreadPoolTestCaseMap& threadPoolTestCaseRegistry() {
}
class TptRegistrationAgent {
- MONGO_DISALLOW_COPYING(TptRegistrationAgent);
+ TptRegistrationAgent(const TptRegistrationAgent&) = delete;
+ TptRegistrationAgent& operator=(const TptRegistrationAgent&) = delete;
public:
TptRegistrationAgent(const std::string& name, ThreadPoolTestCaseFactory makeTest) {
@@ -85,7 +86,8 @@ public:
template <typename T>
class TptDeathRegistrationAgent {
- MONGO_DISALLOW_COPYING(TptDeathRegistrationAgent);
+ TptDeathRegistrationAgent(const TptDeathRegistrationAgent&) = delete;
+ TptDeathRegistrationAgent& operator=(const TptDeathRegistrationAgent&) = delete;
public:
TptDeathRegistrationAgent(const std::string& name, ThreadPoolTestCaseFactory makeTest) {
diff --git a/src/mongo/util/concurrency/ticketholder.h b/src/mongo/util/concurrency/ticketholder.h
index 53a70e8f914..51c232bc5d1 100644
--- a/src/mongo/util/concurrency/ticketholder.h
+++ b/src/mongo/util/concurrency/ticketholder.h
@@ -32,7 +32,6 @@
#include <semaphore.h>
#endif
-#include "mongo/base/disallow_copying.h"
#include "mongo/db/operation_context.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/mutex.h"
@@ -42,7 +41,8 @@
namespace mongo {
class TicketHolder {
- MONGO_DISALLOW_COPYING(TicketHolder);
+ TicketHolder(const TicketHolder&) = delete;
+ TicketHolder& operator=(const TicketHolder&) = delete;
public:
explicit TicketHolder(int num);
@@ -113,7 +113,8 @@ private:
};
class TicketHolderReleaser {
- MONGO_DISALLOW_COPYING(TicketHolderReleaser);
+ TicketHolderReleaser(const TicketHolderReleaser&) = delete;
+ TicketHolderReleaser& operator=(const TicketHolderReleaser&) = delete;
public:
TicketHolderReleaser() {
diff --git a/src/mongo/util/decoration_registry.h b/src/mongo/util/decoration_registry.h
index e06b96b22c6..721d2a4077c 100644
--- a/src/mongo/util/decoration_registry.h
+++ b/src/mongo/util/decoration_registry.h
@@ -35,7 +35,6 @@
#include <type_traits>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/static_assert.h"
#include "mongo/stdx/functional.h"
#include "mongo/util/decoration_container.h"
@@ -53,7 +52,8 @@ namespace mongo {
*/
template <typename DecoratedType>
class DecorationRegistry {
- MONGO_DISALLOW_COPYING(DecorationRegistry);
+ DecorationRegistry(const DecorationRegistry&) = delete;
+ DecorationRegistry& operator=(const DecorationRegistry&) = delete;
public:
DecorationRegistry() = default;
diff --git a/src/mongo/util/fail_point.h b/src/mongo/util/fail_point.h
index 57269fa8bc0..367eeab3632 100644
--- a/src/mongo/util/fail_point.h
+++ b/src/mongo/util/fail_point.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/db/operation_context.h"
@@ -69,7 +68,8 @@ namespace mongo {
* 2. Client visible fail point states are read-only when active.
*/
class FailPoint {
- MONGO_DISALLOW_COPYING(FailPoint);
+ FailPoint(const FailPoint&) = delete;
+ FailPoint& operator=(const FailPoint&) = delete;
public:
typedef unsigned ValType;
@@ -213,7 +213,8 @@ private:
* MONGO_FAIL_POINT_BLOCK macro.
*/
class ScopedFailPoint {
- MONGO_DISALLOW_COPYING(ScopedFailPoint);
+ ScopedFailPoint(const ScopedFailPoint&) = delete;
+ ScopedFailPoint& operator=(const ScopedFailPoint&) = delete;
public:
template <typename Callable = std::nullptr_t>
diff --git a/src/mongo/util/heap_profiler.cpp b/src/mongo/util/heap_profiler.cpp
index be7910856a2..3edb8717f79 100644
--- a/src/mongo/util/heap_profiler.cpp
+++ b/src/mongo/util/heap_profiler.cpp
@@ -151,7 +151,8 @@ using Hash = uint32_t;
template <class Key, class Value>
class HashTable {
- MONGO_DISALLOW_COPYING(HashTable);
+ HashTable(const HashTable&) = delete;
+ HashTable& operator=(const HashTable&) = delete;
private:
struct Entry {
diff --git a/src/mongo/util/intrusive_counter.h b/src/mongo/util/intrusive_counter.h
index 1ca640e5a4b..448214ab965 100644
--- a/src/mongo/util/intrusive_counter.h
+++ b/src/mongo/util/intrusive_counter.h
@@ -32,7 +32,6 @@
#include <boost/intrusive_ptr.hpp>
#include <stdlib.h>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/util/allocator.h"
@@ -41,7 +40,8 @@ namespace mongo {
/// This is an alternative base class to the above ones (will replace them eventually)
class RefCountable {
- MONGO_DISALLOW_COPYING(RefCountable);
+ RefCountable(const RefCountable&) = delete;
+ RefCountable& operator=(const RefCountable&) = delete;
public:
/// If false you have exclusive access to this object. This is useful for implementing COW.
diff --git a/src/mongo/util/itoa.h b/src/mongo/util/itoa.h
index 60cda13e676..37451847a95 100644
--- a/src/mongo/util/itoa.h
+++ b/src/mongo/util/itoa.h
@@ -32,7 +32,6 @@
#include <cstdint>
#include <limits>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
namespace mongo {
@@ -42,7 +41,8 @@ namespace mongo {
* and only really should be used in hot code paths.
*/
class ItoA {
- MONGO_DISALLOW_COPYING(ItoA);
+ ItoA(const ItoA&) = delete;
+ ItoA& operator=(const ItoA&) = delete;
public:
static constexpr size_t kBufSize = std::numeric_limits<uint64_t>::digits10 //
diff --git a/src/mongo/util/lru_cache.h b/src/mongo/util/lru_cache.h
index d09aa6f7c84..bfe3ba19bf4 100644
--- a/src/mongo/util/lru_cache.h
+++ b/src/mongo/util/lru_cache.h
@@ -35,7 +35,6 @@
#include <boost/optional.hpp>
-#include "mongo/base/disallow_copying.h"
#include "mongo/stdx/unordered_map.h"
namespace mongo {
@@ -57,7 +56,8 @@ template <typename K,
typename Hash = typename stdx::unordered_map<K, V>::hasher,
typename KeyEqual = typename stdx::unordered_map<K, V, Hash>::key_equal>
class LRUCache {
- MONGO_DISALLOW_COPYING(LRUCache);
+ LRUCache(const LRUCache&) = delete;
+ LRUCache& operator=(const LRUCache&) = delete;
public:
explicit LRUCache(std::size_t maxSize) : _maxSize(maxSize) {}
diff --git a/src/mongo/util/net/sock.h b/src/mongo/util/net/sock.h
index 071cd2a7ced..8079ab00acb 100644
--- a/src/mongo/util/net/sock.h
+++ b/src/mongo/util/net/sock.h
@@ -50,7 +50,6 @@
#include <utility>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/config.h"
#include "mongo/logger/log_severity.h"
#include "mongo/platform/compiler.h"
@@ -83,7 +82,8 @@ typedef int SOCKET;
* todo: ssl
*/
class Socket {
- MONGO_DISALLOW_COPYING(Socket);
+ Socket(const Socket&) = delete;
+ Socket& operator=(const Socket&) = delete;
public:
static const int errorPollIntervalSecs;
diff --git a/src/mongo/util/net/ssl_manager.h b/src/mongo/util/net/ssl_manager.h
index 7a8f5889d1b..de77d2951ae 100644
--- a/src/mongo/util/net/ssl_manager.h
+++ b/src/mongo/util/net/ssl_manager.h
@@ -37,7 +37,6 @@
#ifdef MONGO_CONFIG_SSL
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/bson/bsonobj.h"
#include "mongo/db/service_context.h"
diff --git a/src/mongo/util/perfctr_collect.h b/src/mongo/util/perfctr_collect.h
index 31a1028c41c..95d9222b434 100644
--- a/src/mongo/util/perfctr_collect.h
+++ b/src/mongo/util/perfctr_collect.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"
@@ -53,7 +52,8 @@ class BSONObjBuilder;
* instance name.
*/
class PerfCounterCollection {
- MONGO_DISALLOW_COPYING(PerfCounterCollection);
+ PerfCounterCollection(const PerfCounterCollection&) = delete;
+ PerfCounterCollection& operator=(const PerfCounterCollection&) = delete;
friend class PerfCounterCollector;
@@ -136,7 +136,8 @@ private:
* output the raw counter values to BSONObjBuilder.
*/
class PerfCounterCollector {
- MONGO_DISALLOW_COPYING(PerfCounterCollector);
+ PerfCounterCollector(const PerfCounterCollector&) = delete;
+ PerfCounterCollector& operator=(const PerfCounterCollector&) = delete;
public:
~PerfCounterCollector();
diff --git a/src/mongo/util/periodic_runner.h b/src/mongo/util/periodic_runner.h
index 59829584a51..561775a5302 100644
--- a/src/mongo/util/periodic_runner.h
+++ b/src/mongo/util/periodic_runner.h
@@ -31,7 +31,6 @@
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/stdx/functional.h"
#include "mongo/util/time_support.h"
diff --git a/src/mongo/util/periodic_runner_impl.h b/src/mongo/util/periodic_runner_impl.h
index 97e9467a436..b27b9ef09f2 100644
--- a/src/mongo/util/periodic_runner_impl.h
+++ b/src/mongo/util/periodic_runner_impl.h
@@ -61,7 +61,8 @@ public:
private:
class PeriodicJobImpl {
- MONGO_DISALLOW_COPYING(PeriodicJobImpl);
+ PeriodicJobImpl(const PeriodicJobImpl&) = delete;
+ PeriodicJobImpl& operator=(const PeriodicJobImpl&) = delete;
public:
friend class PeriodicRunnerImpl;
diff --git a/src/mongo/util/progress_meter.h b/src/mongo/util/progress_meter.h
index 3e1e1ac70e1..c666c0e90a2 100644
--- a/src/mongo/util/progress_meter.h
+++ b/src/mongo/util/progress_meter.h
@@ -36,7 +36,8 @@
namespace mongo {
class ProgressMeter {
- MONGO_DISALLOW_COPYING(ProgressMeter);
+ ProgressMeter(const ProgressMeter&) = delete;
+ ProgressMeter& operator=(const ProgressMeter&) = delete;
public:
ProgressMeter(unsigned long long total,
@@ -130,7 +131,8 @@ private:
* underlying ProgressMeter, which is owned by CurOp.
*/
class ProgressMeterHolder {
- MONGO_DISALLOW_COPYING(ProgressMeterHolder);
+ ProgressMeterHolder(const ProgressMeterHolder&) = delete;
+ ProgressMeterHolder& operator=(const ProgressMeterHolder&) = delete;
public:
ProgressMeterHolder() : _pm(nullptr) {}
diff --git a/src/mongo/util/queue.h b/src/mongo/util/queue.h
index c503f74808a..6cc79d5d47f 100644
--- a/src/mongo/util/queue.h
+++ b/src/mongo/util/queue.h
@@ -33,7 +33,6 @@
#include <limits>
#include <queue>
-#include "mongo/base/disallow_copying.h"
#include "mongo/stdx/chrono.h"
#include "mongo/stdx/condition_variable.h"
#include "mongo/stdx/functional.h"
@@ -51,7 +50,8 @@ namespace mongo {
*/
template <typename T>
class BlockingQueue {
- MONGO_DISALLOW_COPYING(BlockingQueue);
+ BlockingQueue(const BlockingQueue&) = delete;
+ BlockingQueue& operator=(const BlockingQueue&) = delete;
public:
using GetSizeFn = stdx::function<size_t(const T&)>;
diff --git a/src/mongo/util/signal_handlers_synchronous.cpp b/src/mongo/util/signal_handlers_synchronous.cpp
index 99b70b03340..90b758d40fc 100644
--- a/src/mongo/util/signal_handlers_synchronous.cpp
+++ b/src/mongo/util/signal_handlers_synchronous.cpp
@@ -42,7 +42,6 @@
#include <streambuf>
#include <typeinfo>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/logger/log_domain.h"
#include "mongo/logger/logger.h"
@@ -94,7 +93,8 @@ void endProcessWithSignal(int signalNum) {
// This should only be used with MallocFreeOSteam
class MallocFreeStreambuf : public std::streambuf {
- MONGO_DISALLOW_COPYING(MallocFreeStreambuf);
+ MallocFreeStreambuf(const MallocFreeStreambuf&) = delete;
+ MallocFreeStreambuf& operator=(const MallocFreeStreambuf&) = delete;
public:
MallocFreeStreambuf() {
@@ -114,7 +114,8 @@ private:
};
class MallocFreeOStream : public std::ostream {
- MONGO_DISALLOW_COPYING(MallocFreeOStream);
+ MallocFreeOStream(const MallocFreeOStream&) = delete;
+ MallocFreeOStream& operator=(const MallocFreeOStream&) = delete;
public:
MallocFreeOStream() : std::ostream(&_buf) {}
diff --git a/src/mongo/util/stacktrace_windows.cpp b/src/mongo/util/stacktrace_windows.cpp
index 0e7eacf40d7..bf98e1f0646 100644
--- a/src/mongo/util/stacktrace_windows.cpp
+++ b/src/mongo/util/stacktrace_windows.cpp
@@ -48,7 +48,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/init.h"
#include "mongo/stdx/memory.h"
#include "mongo/util/assert_util.h"
@@ -65,7 +64,8 @@ const auto kPathBufferSize = 1024;
// symbol handler. Because access to the symbol handler API is not thread-safe, it also provides
// a lock/unlock method so the whole symbol handler can be used with a stdx::lock_guard.
class SymbolHandler {
- MONGO_DISALLOW_COPYING(SymbolHandler);
+ SymbolHandler(const SymbolHandler&) = delete;
+ SymbolHandler& operator=(const SymbolHandler&) = delete;
public:
SymbolHandler() {
diff --git a/src/mongo/util/tcmalloc_set_parameter.cpp b/src/mongo/util/tcmalloc_set_parameter.cpp
index 07eb2ba7ef0..179d717fafa 100644
--- a/src/mongo/util/tcmalloc_set_parameter.cpp
+++ b/src/mongo/util/tcmalloc_set_parameter.cpp
@@ -37,7 +37,6 @@
#include <gperftools/malloc_extension.h>
#include <valgrind/valgrind.h>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/init.h"
#include "mongo/base/parse_number.h"
#include "mongo/base/status.h"
diff --git a/src/mongo/util/text.h b/src/mongo/util/text.h
index 06c4a1de126..76309541d0c 100644
--- a/src/mongo/util/text.h
+++ b/src/mongo/util/text.h
@@ -32,7 +32,6 @@
#include <string>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
#include "mongo/config.h"
@@ -93,7 +92,8 @@ inline std::wstring toNativeString(const char* s) {
#endif
class WindowsCommandLine {
- MONGO_DISALLOW_COPYING(WindowsCommandLine);
+ WindowsCommandLine(const WindowsCommandLine&) = delete;
+ WindowsCommandLine& operator=(const WindowsCommandLine&) = delete;
char** _argv;
char** _envp;
diff --git a/src/mongo/util/thread_safe_string.h b/src/mongo/util/thread_safe_string.h
index baf00eea527..606d0144f7f 100644
--- a/src/mongo/util/thread_safe_string.h
+++ b/src/mongo/util/thread_safe_string.h
@@ -33,7 +33,6 @@
#include <iosfwd>
#include <string>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
namespace mongo {
@@ -43,7 +42,8 @@ namespace mongo {
* you will never get a bad pointer, though data may be mungedd
*/
class ThreadSafeString {
- MONGO_DISALLOW_COPYING(ThreadSafeString);
+ ThreadSafeString(const ThreadSafeString&) = delete;
+ ThreadSafeString& operator=(const ThreadSafeString&) = delete;
public:
ThreadSafeString(size_t size = 256) : _size(size), _buf(new char[size]) {
diff --git a/src/mongo/util/version.h b/src/mongo/util/version.h
index 4a587e65e5d..e6726132ced 100644
--- a/src/mongo/util/version.h
+++ b/src/mongo/util/version.h
@@ -34,7 +34,6 @@
#include <tuple>
#include <vector>
-#include "mongo/base/disallow_copying.h"
#include "mongo/base/string_data.h"
namespace mongo {
@@ -47,7 +46,8 @@ class BSONObjBuilder;
* able to access version information.
*/
class VersionInfoInterface {
- MONGO_DISALLOW_COPYING(VersionInfoInterface);
+ VersionInfoInterface(const VersionInfoInterface&) = delete;
+ VersionInfoInterface& operator=(const VersionInfoInterface&) = delete;
public:
using BuildInfoTuple = std::tuple<StringData, StringData, bool, bool>;