c++11 how to implement `std::string ToString(std::tuple<Args…> &t)`?
I want a very friendly ToString function for many types, include the std::tuple . The function is like this: template <typename T> inline std::string ToString(const T &t) { std::stringstream ss; ss << t; return ss.str(); } template <typename... Args> inline std::string ToString(const std::tuple<Args...> &t) { std::stringstream ss; for (int i = 0; i < t.size(); i++) { ss << ToString(std::get<i>(t)) << " "; } return ss.str(); } The second part is wrong on grammar, how to implement it with c++11 template ? And, how to implement the FromString like this: template <typename T> inline T FromString