need help about get all public static function name

test test at gmail.com
Mon Oct 22 10:16:22 UTC 2018


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 ?


More information about the Digitalmars-d-learn mailing list