parent
d75a835ca1
commit
5eb63a32e5
|
@ -37,13 +37,9 @@ ParametersParser::ParametersParser(ParameterList params,
|
|||
throw runtime_error{format("switch '-{}' specified more than once", it->key)};
|
||||
switch_seen[switch_index] = true;
|
||||
|
||||
if (it->value.takes_arg)
|
||||
{
|
||||
++i;
|
||||
if (i == params.size() or params[i][0_byte] == '-')
|
||||
if (it->value.takes_arg and ++i == params.size())
|
||||
throw missing_option_value(it->key);
|
||||
}
|
||||
}
|
||||
else // positional
|
||||
{
|
||||
if (desc.flags & ParameterDesc::Flags::SwitchesOnlyAtStart)
|
||||
|
|
Loading…
Reference in New Issue
Block a user