What does auto std.stdio.File.ByChunkImpl byChunk (ulong chunkSize ); mean?

Jonathan M Davis newsgroup.d at jmdavisprog.com
Fri Aug 3 17:58:58 UTC 2018


On Friday, August 03, 2018 17:47:53 kdevel via Digitalmars-d-learn wrote:
> On Friday, 3 August 2018 at 17:27:07 UTC, Adam D. Ruppe wrote:
> > But remember, this is documentation that just happens to look
> > like code, so it is intended to be legible by people rather
> > than the compiler.
>
> I could not find any elucidation of the meaning of
>
>     auto <type>
>
> when used as a return type of a function.

It's not valid D code. The ddoc version of the documentation shows the
actual signature:

https://dlang.org/phobos/std_stdio.html#byChunk

If the ddox is supposed to match the actual signature, then it's wrong in
that it inserts the actual type (resulting in two return types) and in that
it replaced size_t with ulong. If ddox is designed with the idea that it's
going to muck with the signature in some manner in attempt to clarify what
stuff like auto is inferred as, then what it's supposed to show depends on
the ddox developers. But regardless, having two return types is incorrect D
code, and what the ddox is showing does not match the actual function
signature.

- Jonathan M Davis



More information about the Digitalmars-d-learn mailing list