>From: "Vladimir Prus" <[EMAIL PROTECTED]>

> Terje Slettebų wrote:
> >>From: "Vladimir Prus" <[EMAIL PROTECTED]>
> >
> >>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.

I guessed you might. However, the solution seemed like a good match to your
question, given that you didn't give any code example of its use. You
mentioned outputting a vector to a stream, using custom separators, and
that's what this does.

> > 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";

I understand what you mean now.


Regards,

Terje

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to