xo-alloc/xo-indentlog/include/xo/indentlog/print/vector.hpp
Roland Conybeare 341fcfd1c7 Add 'xo-indentlog/' from commit 'd43c4af0b4'
git-subtree-dir: xo-indentlog
git-subtree-mainline: 1c3f033933
git-subtree-split: d43c4af0b4
2025-05-10 17:00:33 -05:00

28 lines
517 B
C++

/* file vector.hpp
*
* author: Roland Conybeare, Sep 2022
*/
#pragma once
#include <iostream>
#include <vector>
namespace std {
template<typename T>
inline std::ostream &
operator<<(std::ostream & os,
std::vector<T> const & v)
{
os << "[";
for(size_t i=0, z=v.size(); i<z; ++i) {
if(i > 0)
os << " ";
os << v[i];
}
os << "]";
return os;
} /*operator<<*/
} /*namespace std*/
/* end vector.hpp */