On 2/9/21 6:12 PM, Jack wrote:
static if(is(typeof(__traits(getMember, A, member)) == string function(string)))

That's not what you want. string function(string) is a *pointer* to a function that accepts a string and returns a string.

In addition to getting the overloads (you only get one "b" in the list of members), take the address of the overload. This worked for me:

            foreach(overload; __traits(getOverloads, A, member))
            static if(is(typeof(&overload) == string function(string)))
            {
                arr ~= member;
            }

-Steve

Reply via email to