The index of the UDA if found, or -1 if it was not present.
enum UDA; enum UDA2; @UDA @UDA2 @(42) static void foo() {} int i; static assert(udaIndexOf!(foo, UDA) == 0); static assert(udaIndexOf!(foo, UDA2) == 1); static assert(udaIndexOf!(foo, int) == 2); static assert(udaIndexOf!(foo, string) == -1); static assert(udaIndexOf!(i, UDA) == -1);
Returns the index of a given UDA, as annotated on a symbol.