FunctionAttributes

Returns the functionAttributes of func as an array of strings

@safe
template FunctionAttributes (
alias func
) if (
isCallable!func
) {}

Members

Aliases

FunctionAttributes
alias FunctionAttributes = attributes
Undocumented in source.

Manifest constants

attributes
enum attributes;
Undocumented in source.

Examples

nothrow pure @trusted @nogc void foo();
pure @nogc void bar();
@safe
struct S {
    pure void foo() {}
}

FunctionAttributes!foo; // ["nothrow", "pure", "@trusted", "@nogc"]
FunctionAttributes!bar; // ["pure", "@nogc", "@system"]
FunctionAttributes!(S.foo); // ["pure", "@safe"]

Meta