Skip to content

Instantly share code, notes, and snippets.

@edwardean
Created December 17, 2015 08:57
Show Gist options
  • Save edwardean/cd9c406e54e61384b142 to your computer and use it in GitHub Desktop.
Save edwardean/cd9c406e54e61384b142 to your computer and use it in GitHub Desktop.
#if __has_feature(nullability)
# define __ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
# define __ASSUME_NONNULL_END NS_ASSUME_NONNULL_END
# define __NULLABLE __nullable
#else
# define __ASSUME_NONNULL_BEGIN
# define __ASSUME_NONNULL_END
# define __NULLABLE
#endif
#if __has_feature(objc_generics)
# define __GENERICS(...) <__VA_ARGS__>
# define __GENERICS_TYPE(...) __VA_ARGS__
#else
# define __GENERICS(class, ...)
# define __GENERICS_TYPE(...)
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment