• 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: c++ constructor arguments
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: c++ constructor arguments


  • Subject: Re: c++ constructor arguments
  • From: Mark Woollard <email@hidden>
  • Date: Wed, 18 Aug 2010 07:13:40 -0400

The error is occurring because temp objects are implicitly const, since there is no way to access or modify the object at the scope it is created. If you change your constructor signature to take const reference the error will go away as the compiler will now be able to find a suitable constructor. MS compiler is lax and doesn't adhere to the specs.

Regards
Mark

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: 
 >c++ constructor arguments (From: Jason Breckenridge <email@hidden>)

  • Prev by Date: c++ constructor arguments
  • Next by Date: Re: How to change text spacing with IB?
  • Previous by thread: c++ constructor arguments
  • Next by thread: Help understanding this error
  • Index(es):
    • Date
    • Thread