[Issue 6231] [patch] std.conv.to/std.format.: Structs with toString and isInputRange match multiple templates.

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Jun 14 02:36:35 PDT 2012


http://d.puremagic.com/issues/show_bug.cgi?id=6231


Kenji Hara <k.hara.pg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


--- Comment #2 from Kenji Hara <k.hara.pg at gmail.com> 2012-06-14 02:38:46 PDT ---
Now almost bugs around formatting were fixed.

(In reply to comment #1)
> By the way, I like the idea of 
>    void toString(void delegate(const(char)[]) sink, FormatSpec fmt);
>    void toString(void delegate(const(char)[]) sink, string fmt);
> but are which one is preferred? And if/when is Object going to switch over?

Getting FormatSpec version is most specialized than others, so is preferred.
And such enhanced toStrings are priority than Object.toString() in class.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list