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:
parent
85c253ed4a
commit
9ce00f26f9
@ -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 << "]";
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user