On 11/22/10 12:33 PM, Roy Stogner wrote: > > On Mon, 22 Nov 2010, John Peterson wrote: > >> So... I'm wondering if we should do something similar (disable op= and >> copy ctor unless needed and explicitly provided, possibly with a >> macro) in all of our library classes? > > So a bunch of potential nasty run-time errors turn into compile-time > errors? Sounds like a big improvement to me.
FWIW --- the g++ compiler option -Weffc++ can be helpful for tracking down this kind of stuff --- it will emit warnings about classes that violate some of the coding guidelines from Myers' book Effective C++, including one regarding copy constructors and assignment operators. (Because many standard headers violate these guidelines, this option will usually produce a lot of extra compiler noise even for code that follows the Effective C++ guidelines to the letter.) -- Boyce ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Libmesh-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/libmesh-devel
