Open
Description
index_
variable is a map that holds the arguments that are added using addArgument
.
The exists
function is currently written as follows
bool exists(const String& name) const { return index_.count(delimit(name)) > 0; }
so a code like the one below will always enter the if's body, even if the clean
argument has not been sent to the program,
parser.addArgument("-c", "--clean");
// parsing passed arguments
parser.parse(size_t(__argc), const_cast<const char **>(__argv));
if (parser.exists("clean")) {
// ...
}
This is inconsistent with the definition given for the exists
function
exists() check if an argument has been found
Thank you for your efforts,
Sincerely,
Ahmad
Metadata
Metadata
Assignees
Labels
No labels