• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Predefined macro for ARC
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Predefined macro for ARC


  • Subject: Re: Predefined macro for ARC
  • From: Ken Thomases <email@hidden>
  • Date: Thu, 18 Aug 2011 10:00:49 -0500

On Aug 18, 2011, at 8:49 AM, Jon Gary wrote:

> Is there a predefined macro in clang for ARC to conditionally compile edits for ARC?

Quoting Greg Parker from the devforums:

The LLVM Compiler's checks are called __has_feature. ARC is one of the features you can check for.

#ifndef __has_feature
// not LLVM Compiler
#define __has_feature(x) 0
#endif

#if __has_feature(objc_arc)
// compiling with ARC
#else
// compiling without ARC
#endif

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Predefined macro for ARC (From: Jon Gary <email@hidden>)

  • Prev by Date: Re: Xcode 4.1, iOS simulator won't run apps [resolved?]
  • Next by Date: Re: Stupid Debugger Error in Xcode when trying to debug app on iPad!
  • Previous by thread: Predefined macro for ARC
  • Next by thread: OS ans XC Versions
  • Index(es):
    • Date
    • Thread