view: ostream operator should print list, not concatenation
This commit is contained in:
parent
e1e5efb357
commit
8e4057cc56
7
view.ipp
7
view.ipp
@ -136,6 +136,11 @@ template <typename T>
|
|||||||
std::ostream&
|
std::ostream&
|
||||||
util::operator<< (std::ostream &os, util::view<T> v)
|
util::operator<< (std::ostream &os, util::view<T> v)
|
||||||
{
|
{
|
||||||
std::copy (v.begin (), v.end (), std::ostream_iterator<char> (os));
|
os << '[';
|
||||||
|
|
||||||
|
for (auto &i: v)
|
||||||
|
os << v << ", ";
|
||||||
|
|
||||||
|
os << ']';
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user