getOverloads __traits does not seem to include instances of the generic members
monkyyy
crazymonkyyy at gmail.com
Mon Mar 2 11:23:25 UTC 2026
On Monday, 2 March 2026 at 10:53:30 UTC, user1234 wrote:
>
> ```d
> void v2(T)(T t){}
> void v2(){}
> alias v2 = v2!int;
>
>> Error: template instance `v2!int` `v2!int` forward references
>> template declaration `v2(T)(T t)`
I think thats the wrong error message but Im not convinced its
wrong to give an error
```d
void v1(T)();
alias v1= bool;//error
```
```d
void v1(T)(){};
alias v1()= typeof(&v1!int);//valid
unittest{
v1!() foo;
v1!(int);
}
```
alias's without () are not real `names` and in practice my best
guess of their operation is they append what they see to an
overload set.
https://crazymonkyyy.github.io/blackmagic-in-d/overloadset1.html
whatever your trying to do, take care to make your overload sets
aliases be lazy templates and they should behave better
More information about the Digitalmars-d
mailing list