mirror of
https://github.com/aportelli/LatAnalyze.git
synced 2025-04-10 19:20:44 +01:00
more strTo specialisations
This commit is contained in:
parent
a6b96b34bb
commit
38da863801
@ -182,6 +182,16 @@ inline int strTo<int>(const std::string &str)
|
|||||||
{
|
{
|
||||||
return (int)(strtol(str.c_str(), (char **)NULL, 10));
|
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>
|
template <typename T>
|
||||||
inline std::string strFrom(const T x)
|
inline std::string strFrom(const T x)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user