> Date: Mon, 31 Mar 2008 13:00:33 -0700> From: [EMAIL PROTECTED]> To: 
> [email protected]> Subject: Re: C++0X gets lambdas/closures> > 
> Christopher Smith wrote:> > Yeah, 'cause we've been able to come up with a 
> language where the compiler can prove that everything is correct. > > No. I'm 
> simply referring to warnings that are warnings because the > compiler knows 
> you did something wrong and it *will* come back to bite > you, except it 
> doesn't know how you want to fix them. Like "Warning: You > have a virtual 
> methods but no virtual destructor."  There's an error in > your code: Either 
> you shouldn't be declaring anything virtual, or you > need the virtual 
> destructor to avoid corrupting memory. Why is this a > warning and not an 
> error?> Because it's not necessarily an error.  There are situations where 
> you can have virtual functions yet not need a virtual destructor-  whenever 
> you have no dynamic memory in the class.  Although personally I declare a 
> destructor virtual for anything I expect to have children, its never wrong to 
> do so and can save your ass.Another example of something that should be a 
> warning-  size and type mismatches.  A standard library function returns an 
> unsigned value.  I compare that to a signed integer.  This produces a 
> warning.  But 99% of the time, it isn't wrong.  So a warning and not an error 
> is correct.Gabe
_________________________________________________________________
Windows Live Hotmail is giving away Zunes.
http://www.windowslive-hotmail.com/ZuneADay/?locale=en-US&ocid=TXT_TAGLM_Mobile_Zune_V3
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to