سؤال

How do I write the following:

typedef void (^T)(void);
T f() {
    return ^{};
}

without the typedef?

هل كانت مفيدة؟

المحلول

void (^f())(void) { 
  return ^{};
}

You'd better keep the typedef as the return type is not easy to understand in this form.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top