Boost logo

Boost :

From: James Kanze (kanze_at_[hidden])
Date: 2002-02-09 10:44:22


"Rainer Deyke" <root_at_[hidden]> writes:

|> > Okay, given the wide ranging discussion on formatting, I have
|> > resubmitted my original format operator. (Thus placing the
|> > code where my mouth is.)

|> > http://groups.yahoo.com/group/boost/files/format3/

|> > Feedback welcome!

|> Overall, I like. Some comments:

|> - The following should silently swallow the "foo" argument:

|> cout << format("%2$s", "foo", "bar");

|> Right now, it invokes undefined behavior.

Why not an exception? (My own implementation treats the presence of a
%2$ without a %1$ as an error.) Of course, he did say X/Open
compatibility, and in X/Open printf, it is undefined behavior:-).

-- 
James Kanze                                mailto:kanze_at_[hidden]
Conseils en informatique orientée objet/
                    Beratung in objektorientierter Datenverarbeitung
Ziegelhüttenweg 17a, 60598 Frankfurt, Germany Tel. +49(0)179 2607481

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