There are currently unclear by language documentation how the language works when trying to get `alias` or pass `alias` template parameter when dealing with function overload sets.
https://dlang.org/spec/template.html#alias-templatehttps://dlang.org/spec/declaration.html#alias
The question can be illustrated by simple example below:
void foo(string aaa) {}
void foo(string aaa, int bb) {}
template Bar(alias Func)
{
//...
}
alias MyBar = Bar!foo;
After just reading documentation it's hard to reason what do I actuall pass to Bar template in this example. Do I pass just the first overload of foo to bar? Or do I pass the last one? Or do I pass entire overload set?
The same is for `plain` aliases:
alias myFoo = foo;
What is `myFoo` actually? I cannot say it for sure after reading docs.
Also this misundersanding could be when using some of the other language constructs with overloads. For instance `typeof`:
https://dlang.org/spec/declaration.html#Typeof
And maybe there a other cases that I couldn't figure out yet.
It's pretty like the `gray zone` of the language. I can't get straight answer without testing it at practice.
Comment #1 by robert.schadek — 2024-12-13T19:06:58Z