Is there any way to refer to a specific function overload?

For example:

import std.stdio;
import std.traits;

void foo() {}
void foo(int x) {}

void main() {
    writeln(foo.mangleof);
    writeln(ParameterTypeTuple!(foo).stringof);
}

Both of these statements always refer to the first matching function. If I change the order of declarations for foo, the results change.

Is there a way to reference the second overload in this example?

I can use a function pointer with ParameterTypeTuple to get the correct result, but something like mangleof won't work, since that will return the mangle of the local function pointer instead of the original function.

Reply via email to