Re: When and how often do you mix C++ with Objective C in your project?
Re: When and how often do you mix C++ with Objective C in your project?
- Subject: Re: When and how often do you mix C++ with Objective C in your project?
- From: Chris Hanson <email@hidden>
- Date: Thu, 30 Oct 2008 18:59:32 -0700
On Oct 30, 2008, at 6:30 PM, Peter N Lewis wrote:
About the biggest issue is that you cannot have C++ objects in an
Objective C object (their constructors and destructors wont be
called).
You can enable this for code that targets Tiger and later using the
"Call C++ Default Ctors/Dtors in Objective-C" build setting in Xcode
(GCC_OBJC_CALL_CXX_CDTORS), which maps to the -fobjc-call-cxx-cdtors
compiler flag.
However, even when using this flag, NSCopyObject() will not invoke
copy constructors, so it should not be relied upon for classes that
use that runtime function to conform to the NSCopying protocol.
-- Chris
_______________________________________________
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