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 /include/winapi/process.hpp | |
parent | update cmake-common (diff) | |
download | winapi-common-1e5e37a9d1af571e962671db95b23c7cc7ddce6d.tar.gz winapi-common-1e5e37a9d1af571e962671db95b23c7cc7ddce6d.zip |
remove VS 2013 cruft
Diffstat (limited to '')
-rw-r--r-- | include/winapi/process.hpp | 55 |
1 files changed, 2 insertions, 53 deletions
diff --git a/include/winapi/process.hpp b/include/winapi/process.hpp index b79d7c2..d5a4ed5 100644 --- a/include/winapi/process.hpp +++ b/include/winapi/process.hpp @@ -10,7 +10,6 @@ #include "process_io.hpp" #include "resource.hpp" -#include <boost/config.hpp> #include <boost/optional.hpp> #include <windows.h> @@ -28,23 +27,13 @@ struct ProcessParameters { ConsoleNew, }; - explicit ProcessParameters(const CommandLine& cmd_line) : cmd_line(cmd_line) {} - - // VS 2013 won't generate these automatically. - ProcessParameters(ProcessParameters&&) BOOST_NOEXCEPT_OR_NOTHROW; - ProcessParameters& operator=(ProcessParameters) BOOST_NOEXCEPT_OR_NOTHROW; - void swap(ProcessParameters& other) BOOST_NOEXCEPT_OR_NOTHROW; - ProcessParameters(const ProcessParameters&) = delete; + explicit ProcessParameters(const CommandLine& cmd_line) : cmd_line{cmd_line} {} CommandLine cmd_line; boost::optional<process::IO> io; ConsoleCreationMode console_mode = ConsoleNew; }; -inline void swap(ProcessParameters& a, ProcessParameters& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - struct ShellParameters : ProcessParameters { static ShellParameters runas(const CommandLine& cmd_line) { ShellParameters params{cmd_line}; @@ -52,21 +41,11 @@ struct ShellParameters : ProcessParameters { return params; } - explicit ShellParameters(const CommandLine& cmd_line) : ProcessParameters(cmd_line) {} - - // VS 2013 won't generate these automatically. - ShellParameters(ShellParameters&&) BOOST_NOEXCEPT_OR_NOTHROW; - ShellParameters& operator=(ShellParameters) BOOST_NOEXCEPT_OR_NOTHROW; - void swap(ShellParameters& other) BOOST_NOEXCEPT_OR_NOTHROW; - ShellParameters(const ShellParameters&) = delete; + explicit ShellParameters(const CommandLine& cmd_line) : ProcessParameters{cmd_line} {} boost::optional<std::string> verb; }; -inline void swap(ShellParameters& a, ShellParameters& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - class Process { public: using ID = DWORD; @@ -85,12 +64,6 @@ public: static DWORD default_permissions(); static DWORD read_permissions(); - // VS 2013 won't generate these automatically. - Process(Process&&) BOOST_NOEXCEPT_OR_NOTHROW; - Process& operator=(Process) BOOST_NOEXCEPT_OR_NOTHROW; - void swap(Process& other) BOOST_NOEXCEPT_OR_NOTHROW; - Process(const Process&) = delete; - ID get_id() const { return m_id; } const Handle& get_handle() const { return m_handle; } @@ -115,28 +88,4 @@ private: Handle m_handle; }; -inline void swap(Process& a, Process& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - } // namespace winapi - -namespace std { - -template <> -inline void swap(winapi::ProcessParameters& a, - winapi::ProcessParameters& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - -template <> -inline void swap(winapi::ShellParameters& a, winapi::ShellParameters& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - -template <> -inline void swap(winapi::Process& a, winapi::Process& b) BOOST_NOEXCEPT_OR_NOTHROW { - a.swap(b); -} - -} // namespace std |