mirror of
https://github.com/badaix/snapcast.git
synced 2025-06-05 12:21:43 +02:00
to_string and stoul for Android c++11
This commit is contained in:
parent
d51642aa2b
commit
76d19efe0c
3 changed files with 20 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue