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/unittest/unittest.h | |
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/unittest/unittest.h')
-rw-r--r-- | src/mongo/unittest/unittest.h | 12 |
1 files changed, 8 insertions, 4 deletions
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<void(void)> 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 <typename T> 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); |