Created
December 4, 2012 03:41
-
-
Save alvinsj/4200311 to your computer and use it in GitHub Desktop.
support for NS_ENUM and NS_OPTIONS in iOS 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#if (__cplusplus && __cplusplus >= 201103L && (__has_extension(cxx_strong_enums) || __has_feature(objc_fixed_enum))) || (!__cplusplus && __has_feature(objc_fixed_enum)) | |
#define NS_ENUM(_type, _name) enum _name : _type _name; enum _name : _type | |
#if (__cplusplus) | |
#define NS_OPTIONS(_type, _name) _type _name; enum : _type | |
#else | |
#define NS_OPTIONS(_type, _name) enum _name : _type _name; enum _name : _type | |
#endif | |
#else | |
#define NS_ENUM(_type, _name) _type _name; enum | |
#define NS_OPTIONS(_type, _name) _type _name; enum | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment