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
It would be useful for Argument to expose the flag name(s) back to the user. A common use-case for this is DRY-ness when referencing the flags after parsing, or during error handling:
auto foo_flag = std::string_view{"--foo"};
auto arg_foo& = parser.add_argument(foo_flag, ...);
// ...if (parser[foo_flag] != "bad") {
throw std::runtime_error{"invalid value for " + foo_flag + ": ..."};
}
Currently users are forced to wrap the argument class to avoid repeating information:
It would be useful for
Argument
to expose the flag name(s) back to the user. A common use-case for this is DRY-ness when referencing the flags after parsing, or during error handling:Currently users are forced to wrap the argument class to avoid repeating information:
The text was updated successfully, but these errors were encountered: