| 38 | // Recommended for repeated use inside a loop. |
| 39 | template <class T> |
| 40 | void to_string(const T& t, std::string& str) { |
| 41 | str.clear(); |
| 42 | StringOutputBuffer ob(str); |
| 43 | ob << t; |
| 44 | ob.flush(); |
| 45 | } |
| 46 | |
| 47 | // Serialize data t to an STL string and return it. |
| 48 | template <class T> |