Wednesday, June 10, 2015

Re: Generics!

[I asked Jens for the rdar, he suggested I enter it myself, which I just
did.]

If you agree with the Jens/Uli approach, enter your own bug then suggest
it be dupped to this one:

rdar://21325577 Foundation Headers need Generics Macros for Objective C
Collections

#if __has_feature(objc_generics)
#define NSArrayOf(VALUE) NSArray<VALUE>
#define NSDictionaryOf(KEY, VALUE) NSDictionary<KEY, VALUE>
#define NSSetOf(VALUE) NSSet<VALUE>
#else
#define NSArrayOf(VALUE) NSArray
#define NSDictionaryOf(KEY, VALUE) NSDictionary
#define NSSetOf(VALUE) NSSet

No comments:

Post a Comment