From af282c0f68f6929618d904dc9d129019c046092d Mon Sep 17 00:00:00 2001 From: Pranav Date: Wed, 7 Sep 2022 08:30:22 -0500 Subject: [PATCH] Updated example to use std::string instead of cstring for default value --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b89fbb2..10d85da 100644 --- a/README.md +++ b/README.md @@ -748,7 +748,7 @@ files = {"a.txt", "b.txt", "c.txt"} argparse::ArgumentParser program("test"); program.add_argument("input") - .default_value("baz") + .default_value(std::string{"baz"}) .action([](const std::string& value) { static const std::vector choices = { "foo", "bar", "baz" }; if (std::find(choices.begin(), choices.end(), value) != choices.end()) {