Boost logo

Boost :

From: Nathan Myers (ncm_at_[hidden])
Date: 2000-08-22 05:07:58


On Mon, Aug 21, 2000 at 11:44:49PM -0400, David Abrahams wrote:
>
> In fact, one way to handle the grouping of format arguments in this case
> might be to establish the following usage:
>
> cout << (format("%d %d") << i << j) << (format("%d %d") << k << l);
>
> This expression streams two Y objects into cout.

I've been thinking the same thing myself. I.e., I really like this.
Of course we really mean

 std::cout << (boost::format("%d %d") << i << j)
           << (boost::format("%d %d") << k << l);

Nathan Myers
ncm at cantrip dot org


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