• 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
Any compiler warning for default copy constructors?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Any compiler warning for default copy constructors?


  • Subject: Any compiler warning for default copy constructors?
  • From: Scott Fraser <email@hidden>
  • Date: Wed, 22 Feb 2006 15:16:31 -0800

Is there a gcc compiler warning that would flag function call arguments that use a default copy constructor on an object-valued parameter? I just spent way too much time debugging a problem where I inadvertently called a function with an object, instead of the address of the object. The default copy constructor did a shallow copy on entry to the function. On exit, the destructor did a deep delete, removing the entire tree that was being pointed to.

Talk about shooting myself in the foot!  :-(

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


  • Follow-Ups:
    • Re: Any compiler warning for default copy constructors?
      • From: "Clark Cox" <email@hidden>
  • Prev by Date: Distributed Builds - Overloading System
  • Next by Date: Re: Distributed Builds - Overloading System
  • Previous by thread: Re: Distributed Builds - Overloading System
  • Next by thread: Re: Any compiler warning for default copy constructors?
  • Index(es):
    • Date
    • Thread