1
0
mirror of https://github.com/paboyle/Grid.git synced 2024-11-10 07:55:35 +00:00

not special characters in std::vector operator<<

This commit is contained in:
Antonin Portelli 2018-04-04 17:44:56 +01:00
parent 85c253ed4a
commit 9ce00f26f9

View File

@ -367,13 +367,13 @@ namespace Grid {
inline std::ostream & operator<<(std::ostream &os, const std::vector<T> &v)
{
os << "[";
for (auto &x: v)
for (unsigned int i = 0; i < v.size(); ++i)
{
os << x << " ";
}
if (v.size() > 0)
{
os << "\b";
os << v[i];
if (i < v.size() - 1)
{
os << " ";
}
}
os << "]";