diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-15 03:29:20 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2020-10-15 10:39:54 +0300 |
commit | d24ef6058f2d60100be44507d46014ef30010493 (patch) | |
tree | b355d18a2b0f963a6fad9af9f6fa67b2850d31cf /include/winapi/cmd_line.hpp | |
parent | test: add test utility "args" (diff) | |
download | winapi-common-d24ef6058f2d60100be44507d46014ef30010493.tar.gz winapi-common-d24ef6058f2d60100be44507d46014ef30010493.zip |
WIP: add simple Process class
Diffstat (limited to '')
-rw-r--r-- | include/winapi/cmd_line.hpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/winapi/cmd_line.hpp b/include/winapi/cmd_line.hpp index ac88286..60bc56a 100644 --- a/include/winapi/cmd_line.hpp +++ b/include/winapi/cmd_line.hpp @@ -21,6 +21,12 @@ public: CommandLine() = default; + CommandLine(const std::string& argv0, const std::vector<std::string>& args = {}) + : argv0(argv0), args(args) {} + + CommandLine(std::string&& argv0, std::vector<std::string>&& args = {}) + : argv0(std::move(argv0)), args(std::move(args)) {} + bool has_argv0() const { return !argv0.empty(); } std::string get_argv0() const { return argv0; } @@ -50,9 +56,6 @@ private: CommandLine(std::vector<std::string>&& args) : args(std::move(args)) {} - CommandLine(std::string&& argv0, std::vector<std::string>&& args = {}) - : argv0(std::move(argv0)), args(std::move(args)) {} - const std::string argv0; const std::vector<std::string> args; }; |