-
Notifications
You must be signed in to change notification settings - Fork 158
Open
Description
Right from the README quick reference, trying to use repeatable(required("-l") & value("lines", ids)) fails to parse correctly, where the parsing_result considers the required value as a missing argument:
#include "clipp.h"
#include <iostream>
int main(int argc, char *argv[])
{
using namespace clipp;
std::vector<size_t> ids;
auto cli = repeatable(required("-l") & value("lines", ids));
auto result = parse(argc, argv, cli);
if (!result) {
debug::print(std::cerr, result);
return 1;
}
return 0;
}Result of running:
$ ./a.out -l 0
#1 -l -> -l
#2 0 -> lines
lines [missing after 0]
Note that more than one argument (e.g., ./a.out -l 0 -l 1) parses correctly.
Metadata
Metadata
Assignees
Labels
No labels