1template <typename T>
2std::ostream& operator<< (std::ostream& out, const std::vector<T>& v) {
3 if ( !v.empty() ) {
4 out << '[';
5 std::copy (v.begin(), v.end(), std::ostream_iterator<T>(out, ", "));
6 out << "\b\b]";
7 }
8 return out;
9}