all functions that have a first arg of type T

BBasile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Feb 25 20:19:29 PST 2016


On Friday, 26 February 2016 at 03:57:25 UTC, Nicholas Wilson 
wrote:
> foreach(m; __traits(allMembers, vulkan_input))
> {
>     static if (m.endsWith("_T"))
>     {
>         foreach(m2; __traits(allMembers, vulkan_input))
>         {
>              static if 
> (__traits(isStaticFunction,typeof(m2)))// <- what here?
>              {
>                  enum fn = __traits(getMember,vulkan_input, m2);
>                  enum parameters = Parameters!(fn);
>                  static if (parameters[0] == m)
>                      writeln( m, ":",m2);
>              }
>         }
>     }
> }

static if (__traits(isStaticFunction,typeof(m2)))

static if (__traits(isStaticFunction, __traits(getMember, 
vulkan_input, m2))))



More information about the Digitalmars-d-learn mailing list