1
0
mirror of https://github.com/CLIUtils/CLI11.git synced 2025-05-03 14:03:52 +00:00

Nicer default for vector default

This commit is contained in:
Henry Fredrick Schreiner 2017-02-06 21:01:29 -05:00
parent 494a65f812
commit 1183c52817

View File

@ -168,6 +168,9 @@ public:
return variable.size() > 0 && retval; return variable.size() > 0 && retval;
}; };
if(variable.size() == 0)
defaulted = false;
Option* retval = add_option(name, fun, description, defaulted); Option* retval = add_option(name, fun, description, defaulted);
retval->allow_vector = true; retval->allow_vector = true;
retval->_expected = -1; retval->_expected = -1;