summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands.h
diff options
context:
space:
mode:
authorGregory Noma <gregory.noma@gmail.com>2018-07-09 09:35:46 -0400
committerGregory Noma <gregory.noma@gmail.com>2018-07-09 16:47:47 -0400
commit1af9ca56ec8935dae1a1d2aa1ed4ac9f6020c9ab (patch)
tree50bf7e3c5c0eff5eccce266d2eae1264034864d4 /src/mongo/db/commands.h
parentf7dbf6f03397ef6317d8e9dc7bbb32e41a0745d1 (diff)
downloadmongo-1af9ca56ec8935dae1a1d2aa1ed4ac9f6020c9ab.tar.gz
SERVER-36018 Make Command and CommandInvocation non-copyable
Diffstat (limited to 'src/mongo/db/commands.h')
-rw-r--r--src/mongo/db/commands.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/commands.h b/src/mongo/db/commands.h
index 5907fb65990..53788b16d3d 100644
--- a/src/mongo/db/commands.h
+++ b/src/mongo/db/commands.h
@@ -256,6 +256,9 @@ public:
*/
Command(StringData name, StringData oldName = StringData());
+ Command(const Command&) = delete;
+ Command& operator=(const Command&) = delete;
+
// Do not remove or relocate the definition of this "key function".
// See https://gcc.gnu.org/wiki/VerboseDiagnostics#missing_vtable
virtual ~Command();
@@ -420,6 +423,10 @@ private:
class CommandInvocation {
public:
CommandInvocation(const Command* definition) : _definition(definition) {}
+
+ CommandInvocation(const CommandInvocation&) = delete;
+ CommandInvocation& operator=(const CommandInvocation&) = delete;
+
virtual ~CommandInvocation();
/**