Function.withReturnType

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

struct Function
withReturnType
(
string value
)

Examples

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_);

Meta