Search

March 22, 2023
General »
...alias, because the compiler doesn't see the alias after the fact, because "an alias...
March 22, 2023
General »
...design (or implementation). People would expect an alias works the same as the original symbol...
March 22, 2023
General »
...design (or implementation). People would expect an alias works the same as the original symbol...
March 21, 2023
General »
...can't ever work:

```
alias identity(int i) = int;

void main() {
    alias five = identity!5...
March 21, 2023
General »
...and it also wouldn't work with `alias five = identity!5;`. (If it wasn't...
March 21, 2023
General »
Define "somewhere"? Because `identity` can be compiled in a different *compiler call* to `foo`. Anyways...
March 21, 2023
General »
But if we make it work for struct, it will work with every type (with...
March 21, 2023
General »
To explain the mechanism:

The compiler knows what the template parameters are that are used...
March 19, 2023
Learn »
On 3/19/23 06:49, bomat wrote:

> I can live with the `static`
> solution...
March 19, 2023
Genel »
...İşte çözümüm:

Güzel. :)

> ```d
> template whichIn(alias value, A...) {
>    alias T = typeof(value);
>    static foreach...
125 126 127 128 129 130 131 132 133 134 135
Next ›   Last »