why doesn't formattedRead take args by ref instead of by pointer?

Timothee Cour thelastmammoth at gmail.com
Thu May 16 00:54:50 PDT 2013


If I change formattedRead's input signature to:
uint formattedRead(R, Char, S...)(ref R r, const(Char)[] fmt, ref S args)
and adjusted code accordingly.

It seems to work fine.

see implementation here:
https://github.com/timotheecour/dtools/blob/master/dtools/overrides/format.d#L29
(just run unittests: rdmd --main -unittest dtools/all.d)

why is std.format. formattedRead taking by pointer instead ?
could we change that (with proper deprecation), or add that function?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20130516/c5f6f7c5/attachment.html>


More information about the Digitalmars-d-learn mailing list