Re: [ROOT] Print() collections

From: George A. Heintzelman (georgeh@aya.yale.edu)
Date: Fri Mar 16 2001 - 17:54:48 MET


> Nice. Was there a reason to put consts? Does it improve anything except
> making c++ funs happy? It is OK if you introduce non-compatible changes
> which can be easily seen when you recompile your code but in the case of
> const a compiler does not issue any warning on const and non-const
> "overloaded" functions. It is Ok if a user plays with one class and can
> easily see that someting is going wrong at run time. Unfortunately some
> people develop more complex things. 

Anton,

I was arguing for this change pretty strongly. I still stand by it, and 
you can go back in the archive to my old messages to see my arguments 
why.

I don't know what compiler you are using. I assume you're not using a 
Sun CC compiler, because I know that that compiler DOES warn in this 
case. If you are using g++, it will not warn you by default. However, 
you can make it generate a warning, which is not turned on even by with 
-Wall (makes you wonder why it's still called -Wall, but I digress): 
-Woverloaded-virtual should give you warnings about the base class 
functions being hidden.

Good luck,

George Heintzelman
georgeh@aya.yale.edu



This archive was generated by hypermail 2b29 : Fri Jun 08 2001 - 11:51:21 MEST