Boost logo

Boost :

Subject: [boost] [format] Mistake in documentation
From: Yakov Galka (ybungalobill_at_[hidden])
Date: 2012-03-17 13:44:31


The current documentation (
http://www.boost.org/doc/libs/1_49_0/libs/format/doc/format.html) says:

"In the Open-group specification, referring to the same argument several
times (e.g. *"%1$d %1$d"*) has undefined behaviour."

Perhaps it was right some time ago, but it's not longer true. The
Open-group specification (
http://pubs.opengroup.org/onlinepubs/009695399/functions/fprintf.html)
explicitly allows this:

"In format strings containing the "%*n*$" form of conversion specification,
numbered arguments in the argument list can be referenced from the format
string as many times as required."

Thank you,

-- 
Yakov

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