Support positional arguments.

Please note that this feature requires a reecent boost version, ideally 1.57 or
later.
This commit is contained in:
Thomas Voß 2017-01-19 18:40:37 +01:00
commit f98239c70d

View file

@ -208,7 +208,7 @@ int cli::CommandWithFlagsAndAction::run(const Context& ctxt) {
return action_(cli::Command::Context{
ctxt.cin, ctxt.cout,
po::collect_unrecognized(parsed.options, po::exclude_positional)});
po::collect_unrecognized(parsed.options, po::include_positional)});
} catch (const po::error& e) {
ctxt.cout << e.what() << std::endl;
help(ctxt.cout);