mirror of
https://github.com/boostorg/program_options.git
synced 2026-01-19 04:22:15 +00:00
ProgramOptions: Fixed warning about not all control paths returning a value
[SVN r53795]
This commit is contained in:
@@ -56,12 +56,11 @@ namespace boost { namespace program_options {
|
||||
static std::basic_string<charT> empty;
|
||||
if (v.size() > 1)
|
||||
boost::throw_exception(validation_error("multiple values not allowed"));
|
||||
if (v.size() == 1)
|
||||
else if (v.size() == 1)
|
||||
return v.front();
|
||||
else if (allow_empty)
|
||||
return empty;
|
||||
else
|
||||
boost::throw_exception(validation_error("at least one value required"));
|
||||
else if (!allow_empty)
|
||||
boost::throw_exception(validation_error("at least one value required"));
|
||||
return empty;
|
||||
}
|
||||
|
||||
/* Throws multiple_occurrences if 'value' is not empty. */
|
||||
|
||||
Reference in New Issue
Block a user