aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmin Paydar <maPaydar@users.noreply.github.com>2017-12-12 09:33:07 +0330
committerGitHub <noreply@github.com>2017-12-12 09:33:07 +0330
commit6fd6d74539463138a27850f2ed374e7cb0aa751d (patch)
treeb762a8e0ec8fc13b77e6f5dafc58a03941c1e3e2
parentMerge pull request #51 from pavel-belikov/fix-usage-wrapping (diff)
downloadargs.hxx-6fd6d74539463138a27850f2ed374e7cb0aa751d.tar.xz
Adds ParseCLI overload to parse vector of string
-rw-r--r--args.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/args.hxx b/args.hxx
index a8818ab..eee8b14 100644
--- a/args.hxx
+++ b/args.hxx
@@ -2613,6 +2613,11 @@ namespace args
const std::vector<std::string> args(argv + 1, argv + argc);
return ParseArgs(args) == std::end(args);
}
+
+ bool ParseCLI(const std::vector<std::string> args)
+ {
+ return ParseArgs(args) == std::end(args);
+ }
};
inline Command::RaiiSubparser::RaiiSubparser(ArgumentParser &parser_, std::vector<std::string> args_)