diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-16 18:38:30 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-05-16 18:44:21 +0300 |
commit | 1e5e37a9d1af571e962671db95b23c7cc7ddce6d (patch) | |
tree | e4b9900e7f4c1973fa4670f5d43a140bc551098a /test/unit_tests/shared/worker.hpp | |
parent | update cmake-common (diff) | |
download | winapi-common-1e5e37a9d1af571e962671db95b23c7cc7ddce6d.tar.gz winapi-common-1e5e37a9d1af571e962671db95b23c7cc7ddce6d.zip |
remove VS 2013 cruft
Diffstat (limited to 'test/unit_tests/shared/worker.hpp')
-rw-r--r-- | test/unit_tests/shared/worker.hpp | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/test/unit_tests/shared/worker.hpp b/test/unit_tests/shared/worker.hpp index a1067ac..9ba7020 100644 --- a/test/unit_tests/shared/worker.hpp +++ b/test/unit_tests/shared/worker.hpp @@ -9,8 +9,6 @@ #include <winapi/process.hpp> -#include <boost/config.hpp> - #include <windows.h> #include <exception> @@ -22,23 +20,11 @@ namespace worker { class Worker { public: - Worker(winapi::Process&& process) : m_cmd(Command::create()), m_process(std::move(process)) {} - - Worker(Worker&& other) BOOST_NOEXCEPT_OR_NOTHROW : m_cmd(std::move(other.m_cmd)), - m_process(std::move(other.m_process)) {} - - Worker& operator=(Worker other) BOOST_NOEXCEPT_OR_NOTHROW { - swap(other); - return *this; - } - - void swap(Worker& other) BOOST_NOEXCEPT_OR_NOTHROW { - using std::swap; - swap(m_cmd, other.m_cmd); - swap(m_process, other.m_process); - } + Worker(winapi::Process&& process) : m_cmd{Command::create()}, m_process{std::move(process)} {} + Worker(Worker&& other) noexcept = default; Worker(const Worker&) = delete; + Worker& operator=(const Worker& other) noexcept = default; ~Worker() { try { @@ -101,17 +87,4 @@ private: winapi::Process m_process; }; -inline void swap(Worker& a, Worker& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - } // namespace worker - -namespace std { - -template <> -inline void swap(worker::Worker& a, worker::Worker& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - -} // namespace std |