| 60 | /// --------------------------------------------------------------- |
| 61 | template <typename Type> |
| 62 | bool StringToNumber(const std::string& str, Type* value, int base) { |
| 63 | // STATIC_ASSERT(TypeTraits::IsInteger<Type>::Value, "Type must be |
| 64 | // integral type"); |
| 65 | char* endptr; |
| 66 | bool ret = ParseNumber(str.c_str(), value, &endptr, base); |
| 67 | return (ret && *endptr == '\0'); |
| 68 | } |
| 69 | |
| 70 | template <typename Type> |
| 71 | bool StringToNumber(const char* str, Type* value, int base) { |