On Saturday, 26 September 2020 at 23:23:13 UTC, Adam D. Ruppe
wrote:
As a result, you `add` works fine
I'm afraid not. __traits(isStaticFunction, add) is false, I think
it's because it checks if it is a static member function of some
struct/class. How would I check if it is actually a free
function? I tried
isAggregateType!(__traits(parent, add))
but this doesn't even compile since I defined add inside my main
function and __traits(parent, add) evaluates to main, but
isAggregateType expects a type as an argument.