| 126 | // string |
| 127 | template <> |
| 128 | inline int as_integer(const string& func, const string& s, size_t* idx, int base) { |
| 129 | // Use long as no Standard string to integer exists. |
| 130 | long r = as_integer_helper<long>(func, s, idx, base, strtol); |
| 131 | if (r < numeric_limits<int>::min() || numeric_limits<int>::max() < r) |
| 132 | throw_from_string_out_of_range(func); |
| 133 | return static_cast<int>(r); |
| 134 | } |
| 135 | |
| 136 | template <> |
| 137 | inline long as_integer(const string& func, const string& s, size_t* idx, int base) { |
nothing calls this directly
no test coverage detected