mirror of
https://github.com/KeqingMoe/argparse.git
synced 2025-07-04 15:14:39 +00:00
Update README.md
This commit is contained in:
parent
ad016b3c6e
commit
ba8af57470
@ -322,7 +322,7 @@ argparse::ArgumentParser program("test");
|
|||||||
|
|
||||||
program.add_argument("input")
|
program.add_argument("input")
|
||||||
.default_value("baz")
|
.default_value("baz")
|
||||||
.action([=](const std::string& value) {
|
.action([](const std::string& value) {
|
||||||
static const std::vector<std::string> choices = { "foo", "bar", "baz" };
|
static const std::vector<std::string> choices = { "foo", "bar", "baz" };
|
||||||
if (std::find(choices.begin(), choices.end(), value) != choices.end()) {
|
if (std::find(choices.begin(), choices.end(), value) != choices.end()) {
|
||||||
return value;
|
return value;
|
||||||
|
Loading…
Reference in New Issue
Block a user