Boost logo

Boost :

Subject: Re: [boost] [explore] Library Proposal: Container Streaming
From: Vladimir Prus (vladimir_at_[hidden])
Date: 2009-12-01 12:15:51

Michael Caisse wrote:

> I've been trying to think of when I might use such a library. Without
> the symmetry (input as well as output) I can think of few instances
> where this functionality might come in handy. Other than potential debug
> output, what else do you envision? What am I missing?
> I'm also finding little improvement over the following example
> based on your samples. Here I am using Karma to produce the same
> output as Explore. It is a bit more verbose; however, it is infinitely
> more flexible.
> // lets do some containers in containers
> std::vector<std::vector<int> > vvi;
> vvi.push_back(vi);
> vvi.push_back(vi);
> std::cout << format('[' << *( '[' << (stream % ", " ) << ']' ) << ']' , vvi);

I surely would not like to write the above any time I need to dump std::vector
for debugging. And I suspect that the effect on compilation time would also be
somewhat different. In other words, I think there's definitely a place for
an inflexible library that just works.

- Volodya

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