We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 201e2c8 commit 54296caCopy full SHA for 54296ca
1 file changed
argparse.h
@@ -120,7 +120,7 @@ class ArgumentParser {
120
for (auto &a : _arguments) {
121
if (a._required) {
122
if (_variables.find(a._name) == _variables.end()
123
- && _variables.find(_pairs.find(a._name)->second) == _variables.end()) {
+ && (_pairs.find(a._name) == _pairs.end() || _variables.find(_pairs.find(a._name)->second) == _variables.end())) {
124
throw ArgumentNotFound(a, _pairs);
125
}
126
0 commit comments