lilyball / Tomorrowland

Lightweight Promises for Swift & Obj-C

Home Page:https://lilyball.github.io/Tomorrowland/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Promise-creation methods with __has_feature(objc_arc_fields)

lilyball opened this issue · comments

We have a few methods on TWLPromise that we expose for Obj-C++ that return std::pair or std::tuple. Starting in Xcode 10 we can expose similar methods to Obj-C because C structs are allowed to have ARC object pointers in fields. We can test for this with __has_feature(objc_arc_fields).

The new methods we add should be omitted in C++ because the existing std::pair and std::tuple methods are better there.

I'm not sure what we should call them though, we can't re-use the same selector name.