parent
4c6e5af484
commit
91c9897baf
|
@ -839,9 +839,9 @@ double stodLocale(const generic_string& str, _locale_t loc, size_t* idx)
|
||||||
double ans = ::_wcstod_l(ptr, &eptr, loc);
|
double ans = ::_wcstod_l(ptr, &eptr, loc);
|
||||||
#endif
|
#endif
|
||||||
if (ptr == eptr)
|
if (ptr == eptr)
|
||||||
throw new std::invalid_argument("invalid stod argument");
|
throw std::invalid_argument("invalid stod argument");
|
||||||
if (errno == ERANGE)
|
if (errno == ERANGE)
|
||||||
throw new std::out_of_range("stod argument out of range");
|
throw std::out_of_range("stod argument out of range");
|
||||||
if (idx != NULL)
|
if (idx != NULL)
|
||||||
*idx = (size_t)(eptr - ptr);
|
*idx = (size_t)(eptr - ptr);
|
||||||
return ans;
|
return ans;
|
||||||
|
|
Loading…
Reference in New Issue