The function and attributes.
static struct Range { @property auto front() inout { return 8; } } static assert(hasFunctionAttributes!(Range.init.front, FunctionAttribute.inout_)); static assert(!hasFunctionAttributes!(Range.init.front, FunctionAttribute.const_)); static assert(!hasFunctionAttributes!(Range.init.front, FunctionAttribute.inout_, FunctionAttribute.const_));
$(D_PSYMBOL FunctionAttribute).
Determines whether a function has attribute.
This template should get at least two arguments: the function itself and the attributes it should be tested for. If more than one attribute is given, $(D_PSYMBOL hasFunctionAttributes) evaluates to $(D_KEYWORD true) if all of them are present. The attributes should be $(D_PSYMBOL FunctionAttribute) members.