This repository has been archived on 2025-03-22. You can view files and clone it, but cannot push or open issues or pull requests.
travelguide/env/message_std.hpp
2013-08-08 17:02:38 +03:00

28 lines
425 B
C++

#pragma once
#include "../std/vector.hpp"
#include "../std/sstream.hpp"
namespace std
{
inline string ToString(string const & s) { return s; }
template <class T> string ToString(vector<T> const & v)
{
ostringstream ss;
ss << "{ ";
size_t const count = v.size();
for (size_t i = 0; i < count; ++i)
{
ss << ToString(v[i]);
if (i != count - 1)
ss << ", ";
}
ss << " }";
return ss.str();
}
}