Boost logo

Boost :

Subject: Re: [boost] [iostreams]ANNOUNCE:indent_filtering_ostream.zip in vault
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-01-11 08:48:29


On 01/11/10 06:14, vicente.botet wrote:
> Hi,
> ----- Original Message -----
> From: "Larry Evans" <cppljevans_at_[hidden]>
[snip]
> On the example I see that the ++ and -- are not pairwised.
[snip]
>
> Shouldn't a scoped_indent class helps on this?

Thanks for the feedback, Vincente.

Yes, a scoped_indent would help. I think the extra --
was put in there just to show nothing bad would
happen. IOW, the indententation never goes
below 0.

I've used something like a scoped_indent to trace
code. It's called trace_scope, which is attached.
The mout() is actually an earlier version of the code
which didn't use the iostreams library, but works
similar to the proposed code (except mout() couldn't
be converted to basic:ostream&).

-regards,
Larry




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk