From 38da863801f4b6285dda6c2cc9992a4c6f6afe1f Mon Sep 17 00:00:00 2001 From: Antonin Portelli Date: Tue, 8 Apr 2014 19:46:37 +0100 Subject: [PATCH] more strTo specialisations --- lib/Global.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/lib/Global.hpp b/lib/Global.hpp index 5f16246..a8a83e6 100644 --- a/lib/Global.hpp +++ b/lib/Global.hpp @@ -182,6 +182,16 @@ inline int strTo(const std::string &str) { return (int)(strtol(str.c_str(), (char **)NULL, 10)); } +template <> +inline long strTo(const std::string &str) +{ + return strtol(str.c_str(), (char **)NULL, 10); +} +template <> +inline std::string strTo(const std::string &str) +{ + return str; +} template inline std::string strFrom(const T x)