New paper: N3716, A printf-like Interface for the Streams Library (revision 1) -- Zhihao Yuan

A new WG21 paper is available. A copy is linked below, and the paper will also appear in the next normal WG21 mailing. If you are not a committee member, please use the comments section below or the std-proposals forum for public discussion.

Document number: N3716p>

Date: 2013-08-18

A printf-like Interface for the Streams Library (revision 1)

by Zhihao Yuan

Excerpt:

Changes since N3506

  • Support Boost.Format’s simple positional syntax (%1%, %2% ...).
  • Cover the cornor cases “not-mentioned” by the C standard.
  • Mention the function style syntax suggested by BSI in “Future Issues”.

Overview

cout << putf("hello, %s\n", "world");

Printf defines the most widely used syntax to format a text output. It exists in C, Perl, Python and even Java™, and is available from Qt to Boost.Format[1], but not C++ standard library. This proposal tries to define such an interface based on the printf function defined by C[2] for the C++ I/O streams library, with the error handling policy and the type safety considered.

Add a Comment

Comments are closed.

Comments (0)

There are currently no comments on this entry.