March 22, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
...alias, because the compiler doesn't see the alias after the fact, because "an alias... | |||
March 22, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
...design (or implementation). People would expect an alias works the same as the original symbol... | |||
March 22, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
...design (or implementation). People would expect an alias works the same as the original symbol... | |||
March 21, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
...can't ever work:
```
alias identity(int i) = int;
void main() {
alias five = identity!5... | |||
March 21, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
...and it also wouldn't work with `alias five = identity!5;`. (If it wasn't... | |||
March 21, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
Define "somewhere"? Because `identity` can be compiled in a different *compiler call* to `foo`. Anyways... | |||
March 21, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
But if we make it work for struct, it will work with every type (with... | |||
March 21, 2023 General » Re: Does `is` expression with template alias need fixing. | |||
|---|---|---|---|
| |||
To explain the mechanism: The compiler knows what the template parameters are that are used... | |||
March 19, 2023 Learn » Re: alias Error: need 'this' | |||
|---|---|---|---|
| |||
On 3/19/23 06:49, bomat wrote: > I can live with the `static` > solution... | |||
March 19, 2023 Genel » Re: Meta kodlama üzerine bir soru | |||
|---|---|---|---|
| |||
...İşte çözümüm:
Güzel. :)
> ```d
> template whichIn(alias value, A...) {
> alias T = typeof(value);
> static foreach... | |||
Copyright © 1999-2021 by the D Language Foundation