helpers: add to_string() for char

This commit is contained in:
2019-05-05 14:14:34 +02:00
parent f58fa6016b
commit 5fa79b2232
2 changed files with 8 additions and 0 deletions

View File

@@ -1238,6 +1238,13 @@ std::string to_string(unsigned long long i)
s << i;
return s.str();
}
std::string to_string(char i)
{
std::stringstream s;
s << i;
return s.str();
}
#endif
/**

View File

@@ -131,6 +131,7 @@ std::string to_string(long);
std::string to_string(unsigned long);
std::string to_string(long long);
std::string to_string(unsigned long long);
std::string to_string(char);
#else
/* hack... */
#define to_string(x) std::to_string(x)