Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2006-06-26 07:25:27


Ovanes Markarian wrote:

> namespace boost
> {
> template <typename T>
> std::ostream& operator<<(std::ostream& os, const
> std::vector<T>& v) {
> for(typename std::vector<T>::size_type i = 0; i <
> v.size(); ++i) os << v[i] << std::endl;
>
> return os;
> }
> }

No, this is not correct (even though it works with VC) and has nothing to do
with boost::variant.

The only correct place for this operator<< is in namespace std. Of course
you aren't supposed to put things there, but...


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net