
Rene Rivera <grafikrobot@gmail.com> writes:
Jeremy Maitin-Shepard wrote:
Andrey Semashev <andysem@mail.ru> writes:
Printf is not a solution since there may be radical differences in phrase composition in different languages.
Indeed, it is true that printf is not perfect, because it requires that the arguments are referenced in the same order that they are specified in the source code, and that they can only be referenced exactly once. Very simple extensions can be used to support that, however, such as allowing arguments to be referenced by number (or perhaps by a name) and thereby provide a suitable solution.
You just described the Boost.Format library.
The boost format library may be pretty good. It could presumably be adapted to work on top of a different set of backend facilities for formatting various types to character strings/streams, as opposed to being based on the iostreams system, -- Jeremy Maitin-Shepard