0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 13:48:53 +02:00

ircd::util: Add string() convenience to 'to_string' an object stream.

This commit is contained in:
Jason Volk 2016-09-04 06:54:09 -07:00
parent f446081021
commit 7bc7d37052

View file

@ -240,6 +240,15 @@ microtime(char *const &buf,
}
template<class T>
std::string
string(const T &s)
{
using std::stringstream;
return static_cast<stringstream &>(stringstream{} << s).str();
}
} // namespace util
} // namespace ircd
#endif // __cplusplus