Created
December 5, 2011 22:26
-
-
Save steipete/1435680 to your computer and use it in GitHub Desktop.
Don't be a fool and wonder why nothing is working... ADD THIS CHECK.
This file contains 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
// ARC is compatible with iOS 4.0 upwards, but you need at least Xcode 4.2 with Clang LLVM 3.0 to compile it. | |
#if !defined(__clang__) || __clang_major__ < 3 || !__has_feature(objc_arc) | |
#error This project must be compiled with ARC (Xcode 4.2+ with LLVM 3.0 and above) | |
#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The recommended idiom for checking features is:
i.e., there’s no need to check for Clang specifically. Having done that, one can safely use __has_feature(), e.g.