Function.setStatic

Return a new Function object with the static_ attribute set to value.

struct Function
immutable(Function)
setStatic
(
bool value
)

Examples

struct Question
{
  static int answer() { return 42; }
}
mixin(
  refract!(Question.answer, "Question.answer")
  .setStatic(false)
  .setBody("{ return Question.answer; }")
  .mixture);
static assert(answer() == 42);

Meta