Boost logo

Boost :

Subject: Re: [boost] manipulators for filtering_stream s
From: Larry Evans (cppljevans_at_[hidden])
Date: 2009-01-22 16:26:16

On 01/21/09 17:26, Larry Evans wrote:
> However, I've looked further at indent.hpp and the storing of the
> pointer to the filter in the ios_base using ios_base::pword. What's
> the advantage of using ios_base::pword to store the pointer to
> something that's already available via basic_ios<...>::rd_buf and then
> filtering_streambuf<...>::component<T>(int):
> This design is implemented in boost vault under the "Input - Output"
> directory in

I believe there is a problem with this rdbuf/component<T>(int)
combination that's illustrated by in the
"Input - Output" directory of the vault. The ios_base::pword store
of indent_filter works because the filter is found by looking up
the unique key of that filter in the ios_base. With the
rdbuf/component<T> method, the component<T>(0) will return the
0 if more than one filter has been pushed onto the streambuf.

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