18 std::string Str(
const vector<T>& x) {
21 if (x.size() > 0) ss << x[0];
22 for(
size_t i = 1; i < x.size(); ++i)
30 std::string Str(
const std::set<T>& x) {
33 typename std::set<T>::const_iterator it = x.begin();
37 for( ; it != x.end(); ++it)
45 std::string Str(
const T& x) {
50 #define CSTR(x) util::Str(x).c_str()
53 template<
class K,
class V>
54 std::string Str(
const typename std::map<K,V>& x) {
57 typename std::map<K,V>::const_iterator it = x.begin();
59 ss << Str(it->first) <<
" : " << Str(it->second);
61 for( ; it != x.end(); ++it)
62 ss <<
", " << Str(it->first) <<
" : " << Str(it->second);