-
Notifications
You must be signed in to change notification settings - Fork 365
pair/tuple defaults #1081
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pair/tuple defaults #1081
Conversation
…er parsing in some cases
…o pair_defaults
…o pair_defaults
@@ -307,6 +307,30 @@ template <typename S> class is_tuple_like { | |||
static constexpr bool value = decltype(test<S>(0))::value; | |||
}; | |||
|
|||
/// This will only trigger for actual void type |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code moved to get thing in the right order
result.back() == ']') { // this is now a vector string likely from the default or user entry | ||
result.pop_back(); | ||
|
||
for(auto &var : CLI::detail::split(result.substr(1), ',')) { | ||
for(auto &var : CLI::detail::split_up(result.substr(1), ',')) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wasn't handling sub vectors properly
@henryiii FYI, no api changes here, Mainly getting the default_val on parity with the types the options support themselves. Also cleaned up a few methods. Was a bug that came up a while ago and hadn't got around to fixing until now. I will merge in a few days |
Fixes issue #1086. In the default_val enums of uint8_t would read in as a string as they could be converted to a string. This worked ok for normal values, but when a check was added for specific strings, it caused an error when the default_val was added. This PR fixes the issue. The builder for coverage was updated to CMake 3.31 (by github), this triggered an error in the coverage tool script. This led to updating that script, which led to uncovering some missing coverage, which led to additional tests, which led to some issues around single element tuples support from #1081, which led to a few other issues that came up in the to_string operation and templates. --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
add capability to accept pair/tuple default values and a little cleaner parsing in some cases
Fixes #711