Commit a01d77a0 authored by Dominik Charousset's avatar Dominik Charousset

Fix parsing of command line options, close #165

parent ade04e9b
...@@ -42,7 +42,7 @@ using string_proj = std::function<optional<std::string> (const std::string&)>; ...@@ -42,7 +42,7 @@ using string_proj = std::function<optional<std::string> (const std::string&)>;
string_proj extract_longopt_arg(const std::string& prefix) { string_proj extract_longopt_arg(const std::string& prefix) {
return [prefix](const std::string& arg) -> optional<std::string> { return [prefix](const std::string& arg) -> optional<std::string> {
if (arg.compare(0, prefix.size(), prefix)) { if (arg.compare(0, prefix.size(), prefix) == 0) {
return std::string(arg.begin() + prefix.size(), arg.end()); return std::string(arg.begin() + prefix.size(), arg.end());
} }
return none; return none;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment