Reputation: 8395
How to apply Objective-C "lightweight" generics to a standalone function?
I've tried the following syntax but it did not compile with Xcode 8.2.1
NSMutableSet<T>* MyFunc<T>(NSSet<T>* input1,NSSet<T>* input2)
{
// ... function body
}
Google doesn't seem to have an answer for this.
Upvotes: 2
Views: 1237
Reputation: 122489
No. Unfortunately, there are no generic functions in Objective-C lightweight generics. There are only generic classes.
Upvotes: 2