Files
triton/lib/external/to_string.hpp

29 lines
357 B
C++
Raw Normal View History

#ifndef ISAAC_TOOLS_TO_STRING_HPP
#define ISAAC_TOOLS_TO_STRING_HPP
2014-08-30 18:02:17 -04:00
#include <string>
2015-01-19 21:29:47 -05:00
#include <sstream>
2014-08-30 18:02:17 -04:00
namespace isaac
2014-08-30 18:02:17 -04:00
{
namespace tools
{
template<class T>
inline std::string to_string ( T const t )
{
#ifdef _GLIBCXX_HAVE_BROKEN_VSWPRINTF
2014-08-30 18:02:17 -04:00
std::stringstream ss;
ss << t;
return ss.str();
#else
return std::to_string(t);
#endif
2014-08-30 18:02:17 -04:00
}
}
}
#endif