Notes from C++ static analysis

Andrej Mitrovic andrej.mitrovich at gmail.com
Wed Jun 26 13:31:56 PDT 2013


On 6/26/13, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> wrote:
> Actually this is good because it allows to customize the format string
> to print only a subset of available information (I've actually used this).

Note that this works:

writefln("%d", x, x);

But the following throws since v2.061:

writeln(format("%d", x, x));

std.format.FormatException at C:\dmd-git\dmd2\windows\bin\..\..\src\phobos\std\string.d(2346):
Orphan format arguments: args[1..2]

I find the latter to be quite useful for debugging code, and wanted
this feature for a long time.


More information about the Digitalmars-d mailing list