Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-13 10:59:31


From: "Peter Dimov" <pdimov_at_[hidden]>
> I'll try to come up with a prototype (when I find time.)

It's at

http://groups.yahoo.com/group/boost/files/format.zip

Executive summary:

int main()
{
 std::cout << format("{0} {1} {2} {3} {4} {1:+06.3f} {2:+#f} {3:#x} {3f}\n",
4.0 / 3.0, 4.0f, 0x1ABCD);
}

produces

[error: argument 0 missing] 1.333333333333333 4 109517 [error: argument 4
missing] +1.333 +4.000000 0x1abcd [error: parse error at '{3f}']

Almost every aspect of format() can be made user-configurable, the syntax
engine, the formatters, the error handlers.


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