https://issues.dlang.org/show_bug.cgi?id=23916

--- Comment #2 from Vladimir Panteleev <[email protected]> ---
(In reply to Nick Treleaven from comment #1)
> template X() {}
> 
> It was decided that typeof(X) is void, that's in the spec. I'm not sure if
> the type of a template instance is defined in the spec.

Any reason not to revise and deprecate this?

> Note: You are allowed to return an expression of type void, this is useful
> in generic code.

Yes. Although, it is an accidental, half-finished feature. You cannot have void
variables or function parameters. Ironically however, you can have noreturn
variables and function parameters.

--

Reply via email to