On Tuesday, 30 July 2019 at 10:08:55 UTC, Newbie2019 wrote:
foreach(int name_index, name; __traits(allMembers, S) ) static if( isDelegateMember!(S, name, Type) ) {enum Rules = getUDAs!( __traits(getMember, S, name) , Rule); // handle the member is match this rules. }
And one more question, how to get the Function address or delegate address of a struct member
on compile time ? struct S { void onMatch(){} } __gshared auto onMatch = (&(S.init)).funcptr ; // this not work