```d
import std;
auto notfoo(T)(T[] args...){
"wrong function 1".writeln;
}
auto notfoo(T,S)(T[S] args){
"right function 1".writeln;
}
auto notfoo2(T)(T[] args...){
"wrong function 2".writeln;
}
auto notfoo2(T,S)(T[S] args,int i=1000){
"right function 2".writeln;
}
void main(){
[1:'a',2:'b',3:'c'].notfoo;
"---".writeln;
[1:'a',2:'b',3:'c'].notfoo2;
}
```
right function 1
---
wrong function 2
https://dlang.org/spec/function.html#function-overloading
> 7. A function with a variadic argument is considered less specialized than a function without.
Comment #1 by robert.schadek — 2024-12-13T19:33:49Z