On Saturday, 16 January 2021 at 15:41:38 UTC, solidstate1991 wrote:
On Saturday, 16 January 2021 at 14:18:55 UTC, Tove wrote:
probably you can use https://dlang.org/spec/traits.html#getOverloads

I don't know how to use it with functions outside of structs/classes.

void foo() {}
void foo(string i) {}

static foreach(overload; __traits(getOverloads, mixin(__MODULE__), "foo"))
    pragma(msg, typeof(overload));

Reply via email to