You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When calling choices("foo") it appears the array overload is preferred, leading to the value not being accepted.
auto choice = std::string{};
cli.add_argument(
lyra::opt(choice, "your choice")
.name("--choice")
.choices("foo") // does not work//.choices(std::string{"foo"}) // does work
.required());
When called with ./a.out --choice foo it causes the error Unable to convert 'foo' to destination type
When calling
choices("foo")
it appears the array overload is preferred, leading to the value not being accepted.When called with
./a.out --choice foo
it causes the errorUnable to convert 'foo' to destination type
Demonstration: https://godbolt.org/z/YWvY3a96x
The text was updated successfully, but these errors were encountered: