|
@ -117,13 +117,23 @@ namespace Jupiter { |
|
|
|
|
|
|
|
|
template<> |
|
|
template<> |
|
|
inline long from_string<long>(std::string_view in_string) { |
|
|
inline long from_string<long>(std::string_view in_string) { |
|
|
|
|
|
if constexpr (sizeof(long) == sizeof(int)) { |
|
|
return asInt(in_string); |
|
|
return asInt(in_string); |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
return static_cast<long>(asLongLong(in_string)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
template<> |
|
|
template<> |
|
|
inline unsigned long from_string<unsigned long>(std::string_view in_string) { |
|
|
inline unsigned long from_string<unsigned long>(std::string_view in_string) { |
|
|
|
|
|
if constexpr (sizeof(long) == sizeof(int)) { |
|
|
return asUnsignedInt(in_string); |
|
|
return asUnsignedInt(in_string); |
|
|
} |
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
return static_cast<unsigned long>(asUnsignedLongLong(in_string)); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
template<> |
|
|
template<> |
|
|
inline long long from_string<long long>(std::string_view in_string) { |
|
|
inline long long from_string<long long>(std::string_view in_string) { |
|
|