On Sunday, 15 June 2025 at 10:51:37 UTC, Nick Treleaven wrote:
An untyped parameter does make the literal an actual template:
```d
pragma(msg, __traits(isTemplate, (x) {})); // true
```
It can be instantiated with a type parameter.
Therefore in the case discussed, the code `(_){}' declares a
On Sunday, 15 June 2025 at 10:51:37 UTC, Nick Treleaven wrote:
So I think there must be another reason why your unary literals
work.
Given it's specifically void return, and top level and it acts
like it matches the first return, I expect that void is
incorrectly being considered a invalid
On Saturday, 14 June 2025 at 23:49:19 UTC, Steven Schveighoffer
wrote:
A lambda is a shortened syntax for a function literal or
delegate literal.
HOWEVER, when you do not give the parameters types, the lambda
becomes a template! Well, not actually a template, but a
quasi-template.
An untype