type or template to search for in UDA list
symbol to query for UDA's
0-based index to start at. Should be positive, and under the total number of attributes.
if set to false considers attached UDA types an error (only accepts instances/values)
aggregated search result struct with 3 field. value aliases found UDA. found is boolean flag for having a valid find. index is integer index in attribute list this UDA was found at.
struct Attribute { int x; } @("something", Attribute(42), Attribute(41)) void symbol(); enum result0 = findNextUDA!(string, symbol, 0); static assert (result0.found); static assert (result0.index == 0); static assert (result0.value == "something"); enum result1 = findNextUDA!(Attribute, symbol, 0); static assert (result1.found); static assert (result1.index == 1); static assert (result1.value == Attribute(42)); enum result2 = findNextUDA!(int, symbol, 0); static assert (!result2.found); enum result3 = findNextUDA!(Attribute, symbol, result1.index + 1); static assert (result3.found); static assert (result3.index == 2); static assert (result3.value == Attribute(41));
Small convenience wrapper to find and extract certain UDA from given type. Will start at the given index and stop on the next element which is of required type.