std.file.read returns void[] why?

Adam D. Ruppe destructionator at gmail.com
Thu Apr 17 05:34:47 PDT 2014


You can implicitly cast /to/ void[], but I don't think you could 
ever implicitly cast from it.

Casting from it needs a bit more thought because you should 
ensure that it actually is what you are saying it is and the 
compiler can't help with that, so by prohibiting the automatic 
cast it at least draws your attention to it.


More information about the Digitalmars-d-learn mailing list