Function Function.withReturnType
Return a new Function
object with the returnType
attribute set to
value
.
Example
pure int answer() { return 42; }
mixin(
refract!(answer, "answer")
.withName("realAnswer")
.withReturnType("real")
.mixture);
static assert(is(typeof(realAnswer()) == real));
static assert(functionAttributes!realAnswer & FunctionAttribute .pure_);