Parameters of overloaded templated function
frame
frame86 at live.com
Tue May 10 13:09:43 UTC 2022
On Tuesday, 10 May 2022 at 12:12:13 UTC, Tejas wrote:
> Using aliases as parameters doesn't work(and the DIP that
> wanted to have this behaviour was de facto rejected)
>
> https://github.com/dlang/DIPs/blob/master/DIPs/other/DIP1023.md
>
> But considering you're passing it as an argument, not a formal
> parameter, it should've worked... Idk what's happening there
I have break it down to a `static if` after that the compiler
gets confused:
```d
static if(__traits(isTemplate, overload)) {
// compiler knows it is a template but error is something about
an aliased function in further processing
}
```
However, changing it to `isSomeFunction!overload` and just
passing the type argument otherwise, compiles. Not very clean,
though.
More information about the Digitalmars-d-learn
mailing list