I try use traits get all public static function of a struct pass to template.

Compiler report " .Function is not accessible from module " with __traits(isStaticFunction, __traits(getMember, Type , name)).

If I add " __traits(getProtection, __traits(getMember, Type, name)) == "public" before "__traits(isStaticFunction, __traits(getMember, Type , name))", it report " argument void function(void*) nothrow @nogc has no protection".



If I add "isFunction!(typeof(__traits(getMember, Type, name)))" before all this, It report type State is not an expression.

If I use "isFunction!(__traits(getMember, BaseType, name)) ", it report again "argument void function(void*) nothrow @nogc has no protection"


how to do this ?

Reply via email to