Template overloads involving `string` and `char[constant]` return value

Adam D. Ruppe via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 21 06:14:42 PDT 2016


On Wednesday, 21 September 2016 at 12:39:57 UTC, Johan Engelen 
wrote:
> It should really be mentioned in the documentation of 
> toHexString, with an actual example instead of a unittest.

Do you use my dpldocs.info? I add such notes there from time to 
time:

http://dpldocs.info/experimental-docs/std.digest.digest.toHexString.1.html


> I guess `ubyte[] hash = md5.finish();` would have fixed it too.

Yes, though IMO that's still depending on the same language 
design flaw. I'd prefer to just explicitly pass `hash[]` to the 
function call so it is clear right there.


More information about the Digitalmars-d-learn mailing list