Update README.md

This commit is contained in:
Pranav Srinivas Kumar 2019-04-01 23:47:49 -04:00 committed by GitHub
parent ad016b3c6e
commit ba8af57470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -322,7 +322,7 @@ argparse::ArgumentParser program("test");
program.add_argument("input")
.default_value("baz")
.action([=](const std::string& value) {
.action([](const std::string& value) {
static const std::vector<std::string> choices = { "foo", "bar", "baz" };
if (std::find(choices.begin(), choices.end(), value) != choices.end()) {
return value;