Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-02-03 12:57:13

Terje Slettebø wrote:
>>From: "Vladimir Prus" <ghost_at_[hidden]>
>>after having to output std::vector to stream again and again using custom
>>solution, I started to wonder why we don't have a solution in boost.
>>Does it makes sense to include operators<< for vectors, sets, etc?
>>I was thinking about
>> <boost/io/vector.hpp>
>> <boost/io/set.hpp>

> You can do this quite well using the standard library and stream iterator
> adapters. This may do both of your approaches above. For example:

I certainly know that.

> std::cout << "Print vector\n";
> std::copy(list.begin(),list.end(),Out(std::cout,"\n"));

And I don't like it in the least. Compared with

    std::cout << "new path is " << v << "\n";

the use of std::copy is way too verbose. BTW, you can't output
std::pair that way.

- Volodya

Boost list run by bdawes at, gregod at, cpdaniel at, john at