|
From: James W. W. <os...@jw...> - 2007-03-01 17:33:57
|
On Mar 1, 2007, at 9:23 AM, Jose' Cruanyes wrote: >> Now that we >> compile as C++, what is the advantage of using E3Num_Max rather than >> std::max? There is a disadvantage, that the operands are evaluated >> twice. > > max is #defined in VC, leading to compilation errors, > > if we find a way to detect availability of std::max, we can define > E3Num_Max, in terms of std::max, or just define it based in > platform... The CodeWarrior version of <algorithm> says #ifdef max #undef max #endif before defining std::max, we could do that... or we could change E3Num_Max to be a function template defined exactly like std::max. |