Skip to content
Snippets Groups Projects
Unverified Commit 2a8878cd authored by Sam Yates's avatar Sam Yates Committed by GitHub
Browse files

Update/fix tinyopt README.md (#1747)

tinyopt README.md had an example which was not updated to the 1.0 API. Fixed upstream, and this is a copy.
parent 9b35ba52
No related branches found
No related tags found
No related merge requests found
......@@ -64,9 +64,9 @@ int main(int argc, char** argv) {
for (auto arg = argv+1; *arg; ) {
bool ok =
help << to::parse(arg, 'h', "help") ||
n << to::parse<int>(arg, 'n', "number") ||
fn << to::parse<int>(arg, to::keywords(functions), 'f', "function");
help << to::parse(arg, "-h", "--help") ||
n << to::parse<int>(arg, "-n", "--number") ||
fn << to::parse<int>(arg, to::keywords(functions), "-f", "--function");
if (!ok) throw to::option_error("unrecognized argument", *arg);
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment