I27 vector<string> doesn't parse
Reorder the `parse_value` functions so that the vector-specific function can see all of the other specific parsers.
This commit is contained in:
parent
21489b233d
commit
abab8ce325
@ -401,15 +401,6 @@ namespace cxxopts
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
parse_value(const std::string& text, std::vector<T>& value)
|
||||
{
|
||||
T v;
|
||||
parse_value(text, v);
|
||||
value.push_back(v);
|
||||
}
|
||||
|
||||
inline
|
||||
void
|
||||
parse_value(const std::string& /*text*/, bool& value)
|
||||
@ -426,6 +417,15 @@ namespace cxxopts
|
||||
value = text;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
void
|
||||
parse_value(const std::string& text, std::vector<T>& value)
|
||||
{
|
||||
T v;
|
||||
parse_value(text, v);
|
||||
value.push_back(v);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
struct value_has_arg
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user