1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 08:55:37 +00:00

more strTo specialisations

This commit is contained in:
Antonin Portelli 2014-04-08 19:46:37 +01:00
parent a6b96b34bb
commit 38da863801

View File

@ -182,6 +182,16 @@ inline int strTo<int>(const std::string &str)
{
return (int)(strtol(str.c_str(), (char **)NULL, 10));
}
template <>
inline long strTo<long>(const std::string &str)
{
return strtol(str.c_str(), (char **)NULL, 10);
}
template <>
inline std::string strTo<std::string>(const std::string &str)
{
return str;
}
template <typename T>
inline std::string strFrom(const T x)