|
|
@@ -2,7 +2,9 @@ |
|
|
|
|
|
|
|
#include <list> |
|
|
|
#include <vector> |
|
|
|
|
|
|
|
#include <cppcore/conversion/string.h> |
|
|
|
#include <cppcore/conversion/convert_cast.h> |
|
|
|
#include <cppargs/misc/option_parser.h> |
|
|
|
|
|
|
|
namespace cppargs |
|
|
@@ -138,7 +140,7 @@ namespace cppargs |
|
|
|
|| *e == '\0')) |
|
|
|
{ |
|
|
|
value_type tmp; |
|
|
|
std::string str(s, static_cast<size_t>(e - s)); |
|
|
|
std::string str(s, cppcore::convert_cast<size_t>(e - s)); |
|
|
|
s = e + 1; |
|
|
|
if (!cppcore::try_from_string(str, tmp)) |
|
|
|
throw std::runtime_error(std::string("unable to parse option argument (option=") + arg + "; value=" + s + ")"); |
|
|
|