Re: Objective-C++ 2.0 - C++ valued properties
Re: Objective-C++ 2.0 - C++ valued properties
- Subject: Re: Objective-C++ 2.0 - C++ valued properties
- From: Scott Thompson <email@hidden>
- Date: Sun, 16 Mar 2008 13:52:59 -0500
On Mar 16, 2008, at 12:17 AM, Jens Ayton wrote:
Given the semantics of properties, I'd expect the following three
functions to generate identical code, with an C++ operator funniness
happening exactly as in the last case (which is plain C++ apart from
@selector()):
The bit of code that seems to make a difference is a copy constructor
for the Vector3D class.
If I include:
Vector3D(const Vector3D &rhs);
in the Vector3D class then an assignment statement:
myObject.position = Vector3D(1.0, 2.0, 3.0);
won't actually invoke the setPosition method of myObject. If you
leave out the copy constructor, however, the setPosition: message is
sent.
Scott
_______________________________________________
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