Function.setAttributes

Set attributes. Return this.

struct Function
immutable(Function)
setAttributes
(
uint value
)

Examples

nothrow int answer();
enum model = refract!(answer, "answer");
with (FunctionAttribute)
{
  mixin(
    model
    .setName("pureAnswer")
    .setAttributes(model.attributes | pure_)
    .mixture);
  static assert(functionAttributes!pureAnswer & pure_);
  static assert(functionAttributes!pureAnswer & nothrow_);
}

Meta