File tree Expand file tree Collapse file tree 2 files changed +3
-1
lines changed
Expand file tree Collapse file tree 2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -462,6 +462,7 @@ namespace argh
462462
463463 inline multimap_iteration_wrapper parser::params (std::string const & name) const
464464 {
465- return multimap_iteration_wrapper (params_.lower_bound (name), params_.upper_bound (name));
465+ auto trimmed_name = trim_leading_dashes (name);
466+ return multimap_iteration_wrapper (params_.lower_bound (trimmed_name), params_.upper_bound (trimmed_name));
466467 }
467468}
Original file line number Diff line number Diff line change @@ -809,6 +809,7 @@ TEST_CASE("Test multiple parameters with the same name")
809809 CHECK (4 == cmdl.params ().size ());
810810 CHECK (1 == cmdl.params (" bar" ).size ());
811811 CHECK (3 == cmdl.params (" foo" ).size ());
812+ CHECK (3 == cmdl.params (" --foo" ).size ());
812813
813814 for (const auto & param : cmdl.params (" foo" )) {
814815 auto found = values.find (param.second );
You can’t perform that action at this time.
0 commit comments