This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Effective c++ member initialization list spurious warning?


John Love-Jensen <eljay@adobe.com> writes:
> (I don't use -Weffc++.  I wish there was some finer granularity over which
> of the seven particular Effective C++ warnings are enabled.)

Indeed... some of the effc++ "rules", though they probably make sense as
general guidelines, seem downright silly when applied mechanically
(e.g. "Make destructors virtual in base classes"[1]), but others seem
useful enough (e.g. "Have `operator=' return a reference to `*this'").

[1] This is a _good idea_ in many cases, but may not make much sense
    when there are no other virtual methods and no data members in the
    derived class, and the resulting addition of a vtable pointer and
    overhead of calling a virtual destructor is often unacceptable.

-Miles

-- 
Yo mama's so fat when she gets on an elevator it HAS to go down.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]