Fix linking problem by adding convert from string to unsigned long long.

This commit is contained in:
Richard Kimberly Heck 2020-10-14 22:28:10 -04:00
parent c0b0add882
commit 1f22a2520a
2 changed files with 35 additions and 20 deletions

View File

@ -118,6 +118,36 @@ docstring convert<docstring>(unsigned long long ull)
{
return from_ascii(lexical_cast<string>(ull));
}
template<>
string convert<string>(long long ll)
{
return lexical_cast<string>(ll);
}
template<>
docstring convert<docstring>(long long ll)
{
return from_ascii(lexical_cast<string>(ll));
}
template<>
unsigned long long convert<unsigned long long>(string const s)
{
return strtoull(s.c_str(), nullptr, 10);
}
/* not presently needed
template<>
long long convert<long long>(string const s)
{
return strtoll(s.c_str(), nullptr, 10);
}
*/
#endif
@ -135,22 +165,6 @@ docstring convert<docstring>(long l)
}
#ifdef HAVE_LONG_LONG_INT
template<>
string convert<string>(long long ll)
{
return lexical_cast<string>(ll);
}
template<>
docstring convert<docstring>(long long ll)
{
return from_ascii(lexical_cast<string>(ll));
}
#endif
template<>
string convert<string>(float f)
{

View File

@ -36,13 +36,14 @@ template<> docstring convert<docstring>(unsigned long ul);
#ifdef HAVE_LONG_LONG_INT
template<> std::string convert<std::string>(unsigned long long ull);
template<> docstring convert<docstring>(unsigned long long ull);
template<> std::string convert<std::string>(long long ll);
template<> docstring convert<docstring>(long long ll);
template<> unsigned long long convert<unsigned long long>(std::string const & s);
// not presently needed
// template<> long long convert<long long>(std::string const & s);
#endif
template<> std::string convert<std::string>(long l);
template<> docstring convert<docstring>(long l);
#ifdef HAVE_LONG_LONG_INT
template<> std::string convert<std::string>(long long ll);
template<> docstring convert<docstring>(long long ll);
#endif
template<> std::string convert<std::string>(float f);
template<> std::string convert<std::string>(double d);
template<> int convert<int>(std::string const & s);