问题
How do I write the following:
typedef void (^T)(void);
T f() {
return ^{};
}
without the typedef?
回答1:
void (^f())(void) {
return ^{};
}
You'd better keep the typedef as the return type is not easy to understand in this form.
来源:https://stackoverflow.com/questions/3948173/objective-c-block-type-as-return-value