• 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: Objective-C++ 2.0 - C++ valued properties
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >Objective-C++ 2.0 - C++ valued properties (From: Scott Thompson <email@hidden>)
 >Re: Objective-C++ 2.0 - C++ valued properties (From: Jens Ayton <email@hidden>)

  • Prev by Date: Re: Compilation leads to Undefined symbols of a nested static lib
  • Next by Date: Re: Creating a Java Tool - Newbie questions
  • Previous by thread: Re: Objective-C++ 2.0 - C++ valued properties
  • Next by thread: Getting line numbers in crash logs with dwarf
  • Index(es):
    • Date
    • Thread