Re: Synthesized ivar for std::tr1::shared_ptr<MyClass>?
Re: Synthesized ivar for std::tr1::shared_ptr<MyClass>?
- Subject: Re: Synthesized ivar for std::tr1::shared_ptr<MyClass>?
- From: Greg Parker <email@hidden>
- Date: Fri, 7 May 2010 12:37:12 -0700
On May 7, 2010, at 12:33 PM, Kyle Sluder wrote:
> On Fri, May 7, 2010 at 12:29 PM, Greg Parker <email@hidden> wrote:
>> Is there some reason why you can't declare your instance variables explicitly, and tell @synthesize to use that ivar in the synthesized accessor methods?
>
> He's trying to keep C++ out of his ObjC headers.
In that case, just stick an #ifdef __cplusplus around the instance variable declarations. Your non-C++ files won't see the ivars, but the non-fragile ivar support in the modern runtime means that they don't have to. It won't work on 32-bit Mac, but automatically synthesized ivars don't work there either.
--
Greg Parker email@hidden Runtime Wrangler
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden