clipp
clipp copied to clipboard
any_other() records the wrong argument
auto cli = (
option("--help").set(show_help)
% "Show this help message",
(option("-J", "--threads") & value("num_threads", num_threads))
% "The number of threads to use (default 0, meaning 'auto')",
value("db_dir").set(dbdir).required(true).blocking(true)
% "The database directory location",
any_other(invalid_params)
);
I'm trying to use any_other
to error out on unknown flags. In the above, if I run with ./my_prog --askdfjaksjd some_directory
, invalid_params
receives some_directory
instead of the garbage flag. Is there a way to get the garbage flag in a list somewhere to give better error messages?