< prev index next >

src/share/vm/utilities/globalDefinitions.hpp

Print this page
rev 13049 : [mq]: pre_globals_minmax_macros

*** 1093,1104 **** #ifdef min #undef min #endif ! #define max(a,b) Do_not_use_max_use_MAX2_instead ! #define min(a,b) Do_not_use_min_use_MIN2_instead // It is necessary to use templates here. Having normal overloaded // functions does not work because it is necessary to provide both 32- // and 64-bit overloaded functions, which does not work, and having // explicitly-typed versions of these routines (i.e., MAX2I, MAX2L) --- 1093,1107 ---- #ifdef min #undef min #endif ! // The following defines serve the purpose of preventing use of accidentally ! // included min max macros from compiling, while continuing to allow innocent ! // min and max identifiers in the code to compile as intended. ! #define max max ! #define min min // It is necessary to use templates here. Having normal overloaded // functions does not work because it is necessary to provide both 32- // and 64-bit overloaded functions, which does not work, and having // explicitly-typed versions of these routines (i.e., MAX2I, MAX2L)
< prev index next >