Trying to do alias template deduction myself.

Elfstone elfstone at yeah.net
Thu Apr 6 05:44:08 UTC 2023


On Wednesday, 5 April 2023 at 04:15:53 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> Please open a PR on to dmd's upstream repo so the testsuite can 
> run and you can start getting feedback from compiler devs.
>
> This would be nice to be resolved.

I think I will eventually.

The matching part is still a problem - it's a copy of `L2:`.

Help is needed. I'm not confident enough to make changes to `L2:` 
so it can be shared. Do you think it's a better idea to get more 
help by opening a PR? It'd be great if a seasoned D dev would 
take it over and finish it.

---

Update:

I just solved `static assert(isInstanceOf!(Regex, Regex!char))`, 
but also noticed there could be much more complicated alias 
declarations. I wouldn't want to handle them all. For example:

```D
alias SomeAlias(T, U) = somemodule.SomeTemp!T.SomeInnerTemp!U;
void foo(X, Y)(SomeAlias!(T, U) v) {} // IFTI will fail
void foo(X, Y)(SomeTemp!T.SomeInnerTemp!U v) {} // also fails
```




More information about the Digitalmars-d mailing list