Boost logo

Boost :

From: Karl Nelson (kenelson_at_[hidden])
Date: 2002-01-22 12:21:29

> On Sun, 2002-01-20 at 23:13, Beman Dawes wrote:
> > I have the sense that Ed's operator[] suggestion would solve some technical
> > problems, but it just plain looks too ugly to me.
> oh, technically it's much the same as operator%..
> The difference is rather how to pass manipulators.
> nobody likes the 'glue()' function. I can rename it 'manip()', but it
> still isn't as nice as having a specific operator, like () for manips
> and [] for arguments.

I sent the solution to that problem. You define the manipulators as
shown in ...

(Similar can be coded for hex and non-argument iomanips)

Then you define your operator % to handle iomanip<T> seperately
from other tokens. Thus there would be no need for "glue" or "manip".


   format(str) % 1 % boost::io::width(10) % 2;


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