This is the mail archive of the 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: Minimum/maximum operators are deprecated?

On Saturday 10 September 2005 13:48, Gunther Piez wrote:
> Why?
> I just switched my project to gcc-4.0.1 and now i get tons of warnings :-(
> I always found the min/max operators extremly useful, especially der
> assignment variations <?= and >?= . There isn't even an replacemant for
> them I am aware of.
> Hell, I even overloaded them :-) Ok, this is possible with some functions
> too, but I find it rather cumbersome (but, hey, other people use java and
> cold-blooded claim they are lucky with it).
> I hoped, they would make it one day into normal C :-/
> Is there a reason?

It was an ill-defined and poorly maintained language extension that was
broken in many cases.  Proper replacements exist in standard C++:


"The G++ minimum and maximum operators (`<?' and `>?') and their compound 
forms (`<?=') and `>?=') have been deprecated and will be removed in a future 
version. Code using these operators should be modified to use std::min and 
std::max instead."


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