Boost logo

Boost :

From: Paul A. Bristow (boost_at_[hidden])
Date: 2003-10-10 14:37:56


| -----Original Message-----
| From: boost-bounces_at_[hidden]
| [mailto:boost-bounces_at_[hidden]]On Behalf Of Brian McNamara
| Sent: Thursday, October 02, 2003 12:34 PM
| To: Boost mailing list
| Subject: Re: [boost] Boost Test tools to test manipulators
|
| I imagine
|
| BOOST_MESSAGE("i = "<< makeManip(flog)( setw(5) ) << i );

doesn't seem to work, (needs another makeManip *operator(int)?)
but you are right in your expectation that

| Actually, I am prone to expect that, e.g.,
| plain setw(n) works without anything extra

because

BOOST_MESSAGE("i = "
  << setw(15)
  << makeManip(flog)(showbase)
  << makeManip(flog)(uppercase)
  << makeManip(flog)(hex)
  << i );

works as we would expect

// i = 0XF

and also

        double d = 12.3456789;
        BOOST_MESSAGE("d = " << setw(15) << setprecision(4) << d );
// d = 12.35

So is this the price we pay for writing endl rather than endl()?

(without your cleverer proposal)

Many thanks.

Paul

Paul A Bristow, Prizet Farmhouse, Kendal, Cumbria, LA8 8AB UK
+44 1539 561830 Mobile +44 7714 33 02 04
mailto:pbristow_at_[hidden]


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