25 lines
283 B
C
25 lines
283 B
C
|
/*
|
||
|
* to_string.h
|
||
|
*
|
||
|
* Created on: Dec 5, 2012
|
||
|
* Author: attero
|
||
|
*/
|
||
|
|
||
|
#ifndef TO_STRING_H_
|
||
|
#define TO_STRING_H_
|
||
|
|
||
|
#include <sstream>
|
||
|
|
||
|
|
||
|
|
||
|
template <class T>
|
||
|
inline std::string to_string (const T& t)
|
||
|
{
|
||
|
std::stringstream ss;
|
||
|
ss << t;
|
||
|
return ss.str();
|
||
|
}
|
||
|
|
||
|
|
||
|
#endif /* TO_STRING_H_ */
|