functionAttributes

Retrieves the attributes of the function F.

The attributes are returned as a bit-mask of $(D_PSYMBOL FunctionAttribute) values.

template functionAttributes (
F...
) if (
isCallable!F
) {}

Members

Functions

Impl
uint Impl()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

functionAttributes
enum uint functionAttributes;
Undocumented in source.

Return Value

Attributes of the function F.

Examples

@property ref int func1() pure nothrow @safe @nogc shared scope;
static assert((functionAttributes!func1 & FunctionAttribute.pure_)
           == FunctionAttribute.pure_);
static assert((functionAttributes!func1 & FunctionAttribute.nothrow_)
           == FunctionAttribute.nothrow_);
static assert((functionAttributes!func1 & FunctionAttribute.safe)
           == FunctionAttribute.safe);
static assert((functionAttributes!func1 & FunctionAttribute.nogc)
           == FunctionAttribute.nogc);
static assert((functionAttributes!func1 & FunctionAttribute.shared_)
           == FunctionAttribute.shared_);
static assert((functionAttributes!func1 & FunctionAttribute.ref_)
           == FunctionAttribute.ref_);
static assert((functionAttributes!func1 & FunctionAttribute.property)
           == FunctionAttribute.property);
static assert((functionAttributes!func1 & FunctionAttribute.scope_)
           == FunctionAttribute.scope_);
static assert((functionAttributes!func1 & FunctionAttribute.system) == 0);
static assert((functionAttributes!func1 & FunctionAttribute.trusted) == 0);
static assert((functionAttributes!func1 & FunctionAttribute.return_) == 0);

See Also

$(D_PSYMBOL FunctionAttribute).

Meta