to_string and stoul for Android c++11

This commit is contained in:
badaix 2015-12-29 13:30:29 +01:00
parent d51642aa2b
commit 76d19efe0c
3 changed files with 20 additions and 4 deletions

View file

@ -159,6 +159,22 @@ static std::string getMacAddress(int sock)
}
namespace utl
{
template<typename T>
static std::string to_string(const T& t)
{
std::stringstream ss;
ss << t;
return ss.str();
}
static long stoul(const std::string& s)
{
return atol(s.c_str());
}
}
#endif