put in place check for value error
This commit is contained in:
parent
aa0a3a415c
commit
65c13302b4
@ -48,7 +48,13 @@ namespace cxxopts
|
|||||||
parse_value(const std::string& text, T& value)
|
parse_value(const std::string& text, T& value)
|
||||||
{
|
{
|
||||||
std::istringstream is(text);
|
std::istringstream is(text);
|
||||||
is >> value;
|
if (!(is >> value))
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!is.eof())
|
||||||
|
{
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user