From f922827d45ce752e148185dfa3a785f7c9cf29fd Mon Sep 17 00:00:00 2001 From: Billy Donahue Date: Wed, 27 Mar 2019 12:21:37 -0400 Subject: 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 --- src/mongo/unittest/unittest.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'src/mongo/unittest/unittest.h') diff --git a/src/mongo/unittest/unittest.h b/src/mongo/unittest/unittest.h index 7144944389a..204443b9708 100644 --- a/src/mongo/unittest/unittest.h +++ b/src/mongo/unittest/unittest.h @@ -290,7 +290,8 @@ typedef stdx::function TestFunction; * contain lists of these. */ class TestHolder { - MONGO_DISALLOW_COPYING(TestHolder); + TestHolder(const TestHolder&) = delete; + TestHolder& operator=(const TestHolder&) = delete; public: TestHolder(const std::string& name, const TestFunction& fn) : _name(name), _fn(fn) {} @@ -313,7 +314,8 @@ private: * by the TEST() macro. */ class Test { - MONGO_DISALLOW_COPYING(Test); + Test(const Test&) = delete; + Test& operator=(const Test&) = delete; public: Test(); @@ -337,7 +339,8 @@ protected: */ template class RegistrationAgent { - MONGO_DISALLOW_COPYING(RegistrationAgent); + RegistrationAgent(const RegistrationAgent&) = delete; + RegistrationAgent& operator=(const RegistrationAgent&) = delete; public: RegistrationAgent(const std::string& suiteName, const std::string& testName); @@ -409,7 +412,8 @@ private: * approach is deprecated. */ class Suite { - MONGO_DISALLOW_COPYING(Suite); + Suite(const Suite&) = delete; + Suite& operator=(const Suite&) = delete; public: Suite(const std::string& name); -- cgit v1.2.1