Skip to content

Commit bc7ba5f

Browse files
committed
feat: [tests] Add to_string for vectors
1 parent e4a1f96 commit bc7ba5f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cpp/includes/tests.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,11 @@ ostream &operator<<(ostream &out, const vector<vector<T>> &c)
170170
out << "}";
171171
return out;
172172
}
173+
174+
template <class T>
175+
string to_string(const vector<T> &c)
176+
{
177+
ostringstream oss;
178+
oss << c;
179+
return oss.str();
180+
}

0 commit comments

Comments
 (0)