If the function is declared with explicit parameter types:
There are cool things possible, if the param type is explicitly typed :)
´´´
import std.traits;
void main()
{
auto list = new SortedList!((Vector3 v) => v.y)();
list.foo(Vector3.init);
}
struct Vector3 { float x, y, z; }
class SortedList(alias comparer) if(is(ReturnType!comparer :
float))
{
alias T = Parameters!comparer[0];
T[] array;
auto foo(T t)
{
// do stuff
}
}
´´´
