Unexpectedly nice case of auto return type
Paul Backus
snarwin at gmail.com
Tue Dec 3 21:08:55 UTC 2019
On Tuesday, 3 December 2019 at 17:45:27 UTC, H. S. Teoh wrote:
> The thing is, `void` means "no return type" (or "no type" in
> some contexts), i.e., void == TBottom in that case.
This is incorrect. `void` as a return type is a unit type; that
is, a type with exactly one value. A function with a return type
of TBottom is one that never returns at all--for example, libc's
`exit` or POSIX's `execve`.
More information about the Digitalmars-d-learn
mailing list