From 1e5e37a9d1af571e962671db95b23c7cc7ddce6d Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 16 May 2021 18:38:30 +0300 Subject: remove VS 2013 cruft --- test/unit_tests/shared/command.hpp | 3 +-- test/unit_tests/shared/console.hpp | 4 ++-- test/unit_tests/shared/test_data.hpp | 2 +- test/unit_tests/shared/worker.hpp | 33 +++------------------------------ 4 files changed, 7 insertions(+), 35 deletions(-) (limited to 'test/unit_tests/shared') diff --git a/test/unit_tests/shared/command.hpp b/test/unit_tests/shared/command.hpp index 4a91370..4ba9385 100644 --- a/test/unit_tests/shared/command.hpp +++ b/test/unit_tests/shared/command.hpp @@ -9,7 +9,6 @@ #include -#include #include #include #include @@ -29,7 +28,7 @@ struct StdHandles { HANDLE err; }; -BOOST_STATIC_CONSTEXPR auto COMMAND_SHMEM_NAME = "shmem-test-cmd"; +static constexpr auto COMMAND_SHMEM_NAME = "shmem-test-cmd"; class Command { public: diff --git a/test/unit_tests/shared/console.hpp b/test/unit_tests/shared/console.hpp index 48d1faa..cdc12e4 100644 --- a/test/unit_tests/shared/console.hpp +++ b/test/unit_tests/shared/console.hpp @@ -28,9 +28,9 @@ class Buffer { public: typedef CONSOLE_SCREEN_BUFFER_INFO Info; - Buffer() : m_handle(winapi::Handle::std_out()), m_info(get_info(m_handle)) {} + Buffer() : m_handle{winapi::Handle::std_out()}, m_info{get_info(m_handle)} {} - Buffer(winapi::Handle&& handle) : m_handle(std::move(handle)), m_info(get_info(m_handle)) {} + Buffer(winapi::Handle&& handle) : m_handle{std::move(handle)}, m_info{get_info(m_handle)} {} int16_t get_columns() const { return m_info.dwSize.X; } diff --git a/test/unit_tests/shared/test_data.hpp b/test/unit_tests/shared/test_data.hpp index 0094f0b..1c8316a 100644 --- a/test/unit_tests/shared/test_data.hpp +++ b/test/unit_tests/shared/test_data.hpp @@ -10,7 +10,7 @@ namespace worker { namespace test_data { -BOOST_STATIC_CONSTEXPR auto str = "Test output."; +static constexpr auto str = "Test output."; inline std::string out() { return "stdout: " + std::string{str}; 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 -#include - #include #include @@ -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 -- cgit v1.2.3